home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / tm480.zip / TMMANUAL.EXE / TMMAN.MAC < prev    next >
Text File  |  1991-09-10  |  129KB  |  3,811 lines

  1. @video
  2. @macro A,
  3. @colour char,white,blue
  4. @window line23,column3,depth1,width75
  5. <esc>=Main menu,<space>=Select,<return>=Action,<F1>=help,<F2>=Direct Access
  6. @endm
  7.  
  8. @macro P,
  9. @colour page,cyan,blue
  10. @dim
  11. @endm
  12.  
  13. @macro X,'SYNTAX        '
  14. @macro N,'NOTE          '
  15. @macro Y,'NOTE1         '
  16. @macro Z,'NOTES         '
  17. @macro V,'EXAMPLE       '
  18.  
  19. @defaults dim,cyan,blue
  20. @head left,"Taskmaster Manual"
  21. @head right,"Copyright (c) FmP 1991"
  22. @head centre,"DIRECT ACCESS"
  23. @nf cr
  24. $P$
  25. @ban
  26. @border
  27.  
  28.           These commands start with the initial letter you specified:
  29.  
  30. @bbmenu white,red
  31. @repeat x16
  32.                                 {          }
  33.  
  34. @col char,white,blue
  35. @win line23,column3,depth1,width64
  36. Action: Select and <return> or <esc> to return to previous menu.
  37. @end
  38. @head centre,"HELP"
  39. @nf 1
  40. $P$
  41. @draw
  42. @ban
  43. @border
  44. @col char,cyan,blue
  45. @win line2,column8,depth21,width64
  46. @bright
  47.         This is the SHAREWARE TASKMASTER On-line Manual.
  48. @dim
  49.  
  50. We regret that due to disc space limitations the information  is
  51. rather  brief.  When you register your copy you may  purchase  a
  52. printed manual which is much more comprehensive.
  53.  
  54. The on-line manual makes extensive use of Bounce-bar menus.  All
  55. you  need to know is the action of the following keys:  <space>,
  56. <>  and  <esc>.  You may also find it useful  to   use  <>,
  57. <> and <home>.
  58.  
  59. >C<
  60.   Remember:  Shareware is NOT FREE.  If you are  referring  to
  61.   this  manual out of need rather than curiosity then you  are
  62.   obviously  making  commercial use of Taskmaster  and  should
  63.   register NOW!
  64.                                                              >C<
  65.  
  66. It may not be obvious but this manual is also a Taskmaster Task!
  67. @bright
  68. @col char,cyan,black
  69. @end
  70. @head centre,"HELP TWO"
  71. @nf 2
  72. $P$
  73. @draw
  74. @ban
  75. @border
  76. @win line2,column8,depth21,width64
  77. Commands  in  this manual are arranged into  functional  groups,
  78. each group is available as a topic on the main menu.
  79.  
  80. Once  a  topic has been selected a further  bounce-bar  menu  is
  81. displayed.   Selection of topics from this secondary  menu  each
  82. display a single screen of text.
  83.  
  84. @bright
  85. If  you know the name of the command or system variable you  are
  86. looking for (perhaps it was mentioned in a screen display),  you
  87. may  use "Direct Access".  To accomplish this press F2 from  any
  88. secondary menu and type the name of the command.
  89.  
  90. @bright
  91. If  you spell it incorrectly a list of commands that start  with
  92. the  specified  initial  letter will be displayed as  a  menu  -
  93. hopefully  including  the one you meant to type.   Selection  of
  94. such a topic will give you Direct Access to the required screen.
  95. You  will be returned to your place in the secondary menu  after
  96. display.
  97. @colour char,white,green
  98. @bright
  99.  
  100.    This  product  has  taken years of  toil  and  gallons  of
  101.    midnight oil to perfect,  please register your copy today.
  102. @col char,cyan,black
  103. @end
  104. @nf 3
  105. @acceptfk esc
  106. @str min1
  107. @colour char,white,green
  108. @bright
  109. @window line 10,column 20,depth11,width36
  110. @outline cyan
  111. @drop
  112.  
  113.  Direct Access:
  114.  
  115.  If you know the name of the  entry 
  116.  you are interested in you may type 
  117.  it  here, if you get it wrong  you 
  118.  will be presented with a list...
  119.  
  120.  Name of command or system variable
  121.  [          ] Press  (F10=quit)
  122. @end
  123. @head centre,"Main menu"
  124. @nf X
  125. $P$
  126. @ban
  127. @border
  128.  
  129. @col char,white,blue
  130.                         Commands:
  131. @bbmenu white,red
  132.                          {Arithmetic                    }
  133.                          {Data manipulation             }
  134.                          {Conversational-mode input     }
  135.                          {Video handling                }
  136.                          {External program control      }
  137.                          {End User Computing interface  }
  138.                          {Data definition               }
  139.                          {Data initialisation           }
  140.                          {Task flow control             }
  141.                          {Operating Environment control }
  142.                          {Forms and menus               }
  143.                          {Disc and File handling        }
  144.                          {Diagnostics                   }
  145. @col char,white,blue
  146.                         System variables:
  147. @col char,white,red
  148.                          {part one                      }
  149.                          {part two                      }
  150. @col char,white,blue
  151.                         General principles:
  152. @col char,white,red
  153.                          {Conventions and Task layout   }
  154.                          {Taskmaster datatypes          }
  155. @col char,white,blue
  156. @win line23,column3,depth1,width73
  157. Actions: <esc>=Exit, <F1>=HELP, <space>=Pick topic, <return>=Action topic
  158. @end
  159. @nf mg
  160. @head left,"General Principles"
  161. $P$
  162. @head centre,"Menu"
  163. @ban
  164. @border
  165.  
  166.  
  167.  
  168. @bbmenu white,red
  169.                         {The PROTEAN Language     }
  170.                         {User interface           }
  171.                         {Video control            }
  172.                         {Block-structures         }
  173.                         {Menu-structures          }
  174.                         {MS-DOS versions          }
  175.                         {Language conventions one }
  176.                         {Language conventions two }
  177.                         {Running Taskmaster Tasks }
  178.                         {Structure of a task      }
  179.                         {Comments                 }
  180.                         {Task layout              }
  181. $A$
  182. @end
  183.  
  184.  
  185. @nf g1
  186. @head centre,"The PROTEAN Language"
  187. @ban
  188. @border
  189.  
  190.         PROTEAN is the name given to both a programming language and the
  191.         full   implementation  of  that  language.  Taskmaster   is   an
  192.         implementation of a subset of PROTEAN containing the job control
  193.         and  screen  handling commands of the  PROTEAN  language.   Most
  194.         Taskmaster commands are also available in PROTEAN.
  195.  
  196.         Taskmaster can interface to EUC,  the End-User-Computing option.
  197.         The  commands that allow this are not available in  the  PROTEAN
  198.         product. Taskmaster is available only as an interpreter, PROTEAN
  199.         however  can interpret source code, generate  intermediate  code
  200.         and execute generated code.
  201.  
  202.         CDOS and Unix version of Taskmaster are also available.
  203.  
  204.         The  PROTEAN language is high level, block structured  and  very
  205.         flexible.
  206. @end
  207. @nf g2
  208. @head centre,"User Interface"
  209. @ban
  210. @border
  211.  
  212.         The  user interface provided by Taskmaster is sophisticated  but
  213.         user-friendly  and consistent.  It allows total  flexibility  in
  214.         terms  of  colour and layout, and makes available  most  of  the
  215.         features  of the video on which Taskmaster is  executing.  FORMS
  216.         may be overlayed and windowed.
  217.  
  218.         Taskmaster  tasks can make decisions to determine what jobs  are
  219.         run,   when  and  in what order.  Taskmaster  can  also  provide
  220.         programs with their run-time parameters and data.
  221. @end
  222. @nf g3
  223. @head centre,"Video control"
  224. @ban
  225. @border
  226.  
  227.         Taskmaster  can control your video by means of a set of  control
  228.         sequences held in a "video definition" file.  It is possible  to
  229.         drive  different  videos by using  different  definition  files.
  230.         Taskmaster  can display menus and forms containing up to  twenty
  231.         "unprotected fields" for data collection.
  232.  
  233.         Not only is Taskmaster able to invoke packaged programs; it also
  234.         possesses  the  ability  to  request  the  necessary  parameters
  235.         required by them.
  236.  
  237.         Most  PC users and in particular new users, welcome the  ability
  238.         to access the facilities of MS-DOS through the use of menus  and
  239.         forms.   In  large organisations,   the  Management  Information
  240.         Services  department can write the TASKS they believe will  best
  241.         support their user base.
  242.  
  243.         Taskmaster  is, we believe, unique in providing an  Interpretive
  244.         block-structured  job-control language with a  fully  integrated
  245.         Display Manager which compares favourably with any other Display
  246.         Manager we have seen.
  247. @end
  248. @nf g4
  249. @head centre,"Block-structures"
  250. @ban
  251. @border
  252.  
  253.         The language supports block structured coding via the IF, WHILE,
  254.         UNTIL, ELSE and FI commands.
  255.  
  256.  IF conditional_expression
  257.    {{CODE-BLOCK}}
  258.  {{ELSE}}
  259.    {{CODE-BLOCK}}
  260.  FI
  261.  
  262.  WHILE conditional_expression
  263.    {{CODE-BLOCK}}
  264.  FI
  265.  
  266.  UNTIL conditional_expression
  267.    {{CODE-BLOCK}}
  268.  FI
  269.         Such  structures can be nested to 48 levels.  In the  foregoing,
  270.         {{CODE-BLOCK}}  can  be any command or commands  which  will  be
  271.         executed  if the conditional expression preceding  evaluates  to
  272.         TRUE. The conditional expression can be complex.
  273. @end
  274. @nf g5
  275. @head centre,"Block-structures 2"
  276. @ban
  277. @border
  278.  
  279.         Other forms of {{CODE-BLOCK}} are provided for MENU handling by:
  280.         OPTION identifier
  281.           {{CODE-BLOCK}}
  282.         RETURN 
  283.  
  284.         In  this  case the {{CODE-BLOCK}} could  include  further  MENUS
  285.         providing a nesting capability to 16 levels.  The RETURN command
  286.         provides the flexibility to return directly to any of the higher
  287.         level menus.
  288.  
  289.         Note that 'menu commands' may   be 
  290.         used even when a  physical menu is     menu 1,cval  
  291.         not required.  This is  called   a     option 1,1,10
  292.         Virtual  menu and can  be used  to       displayln "CVAL = " cval 
  293.         implement     CASE     constructs.       increment cval
  294.         Instead of a menu_name being given       return
  295.         as a parameter to the MENU command     option 1,11
  296.         an INT VAR is given.    The option       displayln "CVAL = 11" 
  297.         actioned is  based on the value of       exitm
  298.         this integer whenever   the   MENU     endm 1
  299.         would normally be displayed. 
  300. @end
  301. @nf g6
  302. @head centre,"MS-DOS versions"
  303. @ban
  304. @border
  305.  
  306.         Taskmaster  is designed to run with all versions of MS-DOS  from
  307.         version 2.0 onwards on machines having IBM compatible ROM BIOS.
  308.  
  309.         If  running under version 4, it will make use  of  multi-tasking
  310.         facilities  where possible and is classified as well-behaved  in
  311.         that environment.
  312. @end
  313. @nf g7
  314. @head centre,"Language conventions"
  315. @ban
  316. @border
  317. @gon
  318.  
  319.      7------------------------------------------------------------------9
  320.      0 Language conventions                                             0
  321.      4-----------------------8------------------------------------------6
  322.      0Character  strings     0 The first byte of a character string or  0
  323.      0                       0 variable  is  referred to as byte 0.     0
  324.      4-----------------------5------------------------------------------6
  325.      0Conditional expressions0 The AND operator always takes precedence 0
  326.      0                       0 over OR.                                 0
  327.      4-----------------------5------------------------------------------6
  328.      0Loops                  0 To obey a loop a set number of times,    0
  329.      0                       0 the controlling integer  always has a    0
  330.      0                       0 starting value of zero, e.g.             0
  331.      0                       0                                          0
  332.      0                       0 clear i                                  0
  333.      0                       0 until i = 10                             0
  334.      0                       0  displayln entry i of list               0
  335.      0                       0 fi i                                     0
  336.      0                       0                                          0
  337.      0                       0 displays 10 lines.                       0
  338.      1-----------------------2------------------------------------------3
  339. @end
  340. @nf g8
  341. @ban
  342. @border
  343. @gon
  344.  
  345.      7------------------------------------------------------------------9
  346.      0 Language conventions                                             0
  347.      4-----------------------8------------------------------------------6
  348.      0 Source lines          0 The first line of a task is regarded as  0
  349.      0                       0 line 1. This  is  generally  compatible  0
  350.      0                       0 with  editors and word processors  that  0
  351.      0                       0 display line numbers.                    0
  352.      4-----------------------5------------------------------------------6
  353.      0 Syntax Definitions    0 Sections enclosed in braces {{like this}}  0
  354.      0                       0 indicate  an optional parameter or  list 0
  355.      0                       0 of parameters.                           0
  356.      4-----------------------5------------------------------------------6
  357.      0 Tables                0 The  first  entry of a  table-of-var  is 0
  358.      0                       0 entry 0.                                 0
  359.      4-----------------------5------------------------------------------6
  360.      0 Video line and        0 The  home  position  on  the  screen  is 0
  361.      0 column numbers        0 referred to as line 0, column 0.         0
  362.      1-----------------------2------------------------------------------3
  363. @end
  364. @nf g9
  365. @head centre,"Running Taskmaster Tasks"
  366. @ban
  367. @border
  368.  
  369.         Taskmaster is always invoked by typing :
  370.  
  371.         TM name-of-task
  372.  
  373.         Taskmaster does not have the code-generation facility  available
  374.         with  the PROTEAN product.  This is not however a  disadvantage,
  375.         since Taskmaster performance when running a task  interpretively
  376.         is quite acceptable for the purpose.
  377.  
  378.         A  task  is  the name given to a file  containing  a  Taskmaster
  379.         program and has a filename of taskname.TSK.
  380. @end
  381. @nf ga
  382. @head centre,"Structure of a task"
  383. @ban
  384. @border
  385.  
  386.         A  task is a set of commands held in a file having an  extension
  387.         of TSK, e.g. COMMS.TSK.
  388.  
  389.         Most  tasks need to manipulate data, for example, data  gathered
  390.         from a form or menu, or in response to questions.  All data  can
  391.         be  referred  to by a symbolic name and these names need  to  be
  392.         declared  at  the  beginning  of  the  task  file  -  the   data
  393.         declarations.
  394.  
  395.         Data declarations are terminated by an END command.
  396.  
  397.         Following  the data declarations are the commands which  execute
  398.         the  task.  Only one command per line may be specified,  a  line
  399.         being  defined  as data terminated by  <carriage-return>  <line-
  400.         feed>.   This format is compatible with standard MS-DOS  Editors
  401.         and Word processing packages.
  402. @end
  403. @nf gb
  404. @head centre,"Comments in Tasks"
  405. @ban
  406. @border
  407.  
  408.         Comments  may  occur  on any line of  a  Taskmaster  task.   The
  409.         comment must appear at the end of the line and must start with a
  410.         semi-colon.   If the line is blank (except for the comment)  the
  411.         semi-colon  must  be in column 1.  Completely  blank  lines  are
  412.         permitted,  as is free format text after the ENDTASK command.
  413.  
  414.         The  last command in a task is normally the ENDTASK command  but
  415.         this command is optional for Taskmaster.
  416. @end
  417. @nf gc
  418. @head centre,"Task layout"
  419. @ban
  420. @border
  421.  
  422.         DATA DECLARATIONS
  423.  
  424.         END command
  425.  
  426.         Executive COMMANDS  }}  The executable code
  427.  
  428.         ENDTASK
  429.  
  430.         The ENDTASK command tells Taskmaster where to find the  PHYSICAL
  431.         end of the task.
  432. @end
  433. @nf mh
  434. @head left,"Taskmaster Datatypes"
  435. $P$
  436. @head centre,"Menu"
  437. @ban
  438. @border
  439.  
  440.  
  441.  
  442. @bbmenu white,red
  443.                         {STRING                }
  444.                         {LITERAL               }
  445.                         {HEX VARIABLE          }
  446.                         {INTEGER CONSTANT      }
  447.                         {HEXADECIMAL CONSTANT  }
  448.                         {VARIABLE              }
  449.                         {TABLE-OF-VARIABLES    }
  450.                         {INTEGER VARIABLE      }
  451.                         {LOGICAL VARIABLE      }
  452.                         {SYSTEM VARIABLE       }
  453.                         {VIDEO CONSTANT        }
  454.                         {ENVIRONMENT VARIABLES }
  455.                         {THE STANDARD LIST     }
  456. $A$
  457. @end
  458.  
  459. @nf h1
  460. @head centre,"STRING Datatype"
  461. @ban
  462. @border
  463.  
  464.         A sequence of characters, e.g. XYZ.  It cannot contain spaces or
  465.         commas  and  lower-case characters will be converted  to  upper-
  466.         case.
  467.  
  468.         Strings  are  not explicitly defined in the data  section  of  a
  469.         task.
  470. @end
  471. @nf h2
  472. @head centre,"LITERAL Datatype"
  473. @ban
  474. @border
  475.  
  476.         Up to 255 characters enclosed in single or double-quotes,   e.g.
  477.         "XYZ".  Characters so enclosed may include spaces and commas.
  478.  
  479.         Lower-case characters are NOT converted to upper-case.
  480. @end
  481. @nf h3
  482. @head centre,"HEX VARIABLE"
  483. @ban
  484. @border
  485.  
  486.         A  hexadecimal value, i.e. a string of hexadecimal digits  (0-9,
  487.         A-F) held as a string of characters in a user-defined area.  The
  488.         size  of  the  variable  is calculated as  half  the  number  of
  489.         supplied digits.
  490.  
  491.         The number of hex digits supplied must always be even, i.e.  the
  492.         hexadecimal digits must be supplied in pairs.
  493.  
  494.         It may be used in any context where a variable is valid.
  495.  
  496.         Initial value : user defined
  497.  
  498.         Sample Declaration
  499.  
  500.         HEXVAR NEWLINE,0D0A
  501. @end
  502. @nf h4
  503. @head centre,"INTEGER CONSTANT"
  504. @ban
  505. @border
  506.  
  507.         A number in the range -32768 to 32767 or 0 to 65535 depending on
  508.         requirements.   When  displayed using a DISPLAY,   DISPLAYLN  or
  509.         CURSOR command INTEGERs take 5 screen positions (6 if negative -
  510.         including minus sign).
  511. @end
  512. @nf h5
  513. @head centre,"HEXADECIMAL CONSTANT"
  514. @ban
  515. @border
  516.  
  517.         A 16-bit hexadecimal constant may be used in place of an integer
  518.         constant  by specifying the hexadecimal digits followed by  'H',
  519.         e.g. 30H.
  520.  
  521.         The  first  hexadecimal digit must always be numeric.  Thus  for
  522.         example, the hex constant A1A2 must be expressed as 0A1A2H.
  523.  
  524.         The  maximum  number  of characters allowed  is  therefore  six,
  525.         including an optional leading zero and terminating 'H'.
  526.  
  527.  EXAMPLES:
  528.  
  529.         DEFINE FUNCTION,01H
  530.         DEFINE CONST2,0B1B9H
  531.         MOVE 3AH TO X1
  532.         ADD 20H TO ICHAR
  533. @end
  534. @nf h6
  535. @head centre,"VARIABLE"
  536. @ban
  537. @border
  538.  
  539.         A  string  of  bytes held in an area named  by  the  user.   The
  540.         maximum  length  must be defined.  Data can be assigned  to  the
  541.         variable during data declaration.
  542.  
  543.         Default value : SPACES
  544.  
  545.         Sample Declaration
  546.  
  547.         VAR INPUT_FILE,14,"A:INVOICE.DAT"
  548.  
  549.         VAR LONG_MESSAGE,400,
  550.         "The text assigned to this message can be defined over "
  551.         "any number of lines, each line enclosed with single or "
  552.         'double quotes.  Each line may be any length '
  553.         "The text should be terminated by a blank line. "
  554.         "The data will contain trailing spaces to the maximum "
  555.         "size declared."
  556.  
  557.         Initially the size of the variable is the size of  default  data 
  558.         declared. 
  559. @end
  560. @nf h7
  561. @head centre,"TABLE-OF-VARIABLES"
  562. @ban
  563. @border
  564.  
  565.         An array of variables which may be subscripted.
  566.  
  567.         Default value : SPACES
  568.  
  569.         Sample Declarations
  570.  
  571.         1.   VAR NAMES,20,OCCURS 50
  572.  
  573.         2.   VAR MESSAGES,3,OCCURS 2,"YesNo "
  574.  
  575.         3.   var day_table,9,occurs 7,
  576.              'Sunday   Monday   Tuesday  Wednesday'
  577.              'Thursday Friday   Saturday '
  578.          
  579.              until count = 7
  580.                displayln entry count of day_table
  581.              fi count
  582. @end
  583. @nf h8
  584. @head centre,"INTEGER VARIABLE"
  585. @ban
  586. @border
  587.  
  588.         A  number  in the range -32768 to 32767 or 0 to 65535 held in  a 
  589.         user-defined area.   Up  to  40  can  be supplied  in  a  single  
  590.         declaration, subject to the maximum line length of 162 bytes.
  591.  
  592.         Initial value : ZERO
  593.  
  594.         Sample Declaration
  595.  
  596.         INT COUNT,ERRORS
  597. @end
  598. @nf h9
  599. @head centre,"LOGICAL VARIABLE"
  600. @ban
  601. @border
  602.  
  603.         A value of TRUE or FALSE held in a user-defined area. The  value
  604.         may be tested by using an IF command of the form :
  605.  
  606.         IF logical_variable_name
  607.  
  608.         Default value : FALSE
  609.  
  610.         Sample Declaration
  611.  
  612.         LOGICAL END_OF_RUN,REPEAT_RUN
  613.  
  614.         Up  to  40  LOGICAL  VARIABLES  can  be  declared  in  a  single
  615.         declaration, subject to the maximum line length of 162 bytes.
  616. @end
  617. @nf ha
  618. @head centre,"SYSTEM VARIABLE"
  619. @ban
  620. @border
  621.  
  622.         An  area containing system data which may be read by  the  user.
  623.         Some  system  variables are read-only, i.e.  you  cannot  change
  624.         their value. An example of a system variable is DATE.
  625.  
  626.         Initial value : implementation dependent
  627.  
  628.         System  variables are "built-in" and are not therefore  declared
  629.         by the user.
  630. @end
  631. @nf hb
  632. @head centre,"VIDEO CONSTANT"
  633. @ban
  634. @border
  635.  
  636.         A  user-defined  name associated with a video  control  sequence
  637.         allowing you to write video independent code.
  638.  
  639.         Default value : NONE
  640.  
  641.         Sample Declaration
  642.  
  643.         VCONST CLEAR_SCREEN,11
  644.         VCONST CLEAR_TO_END_OF_LINE,55
  645.  
  646. @end
  647. @nf hc
  648. @head centre,"ENVIRONMENT VARIABLES"
  649. @ban
  650. @border
  651.  
  652.         Taskmaster  provides easy access to DOS  environment  variables.
  653.         You  may  specify that the value of an environment  variable  be
  654.         used as default data in a VAR declaration for example:
  655.  
  656.         VAR PATH,64,$PATH
  657.  
  658.         sets  the variable PATH to the contents of the PATH  environment
  659.         variable.   If the named environment variable doesn't exist  the
  660.         VAR  will  be initialised in the normal way  (SPACE  filled  and
  661.         length 0).  The $ENVIRONMENT_VAR syntax variant can also be used
  662.         in MOVE commands.
  663. @end
  664. @nf hd
  665. @head centre,"The Standard List"
  666. @ban
  667. @border
  668.  
  669.         Throughout this manual syntax definitions refer to the "Standard
  670.         list of datatypes".
  671.  
  672.         This  generally  means  that the command  will  accept  a  space
  673.         separated list of virtually any datatypes.  Space doesn't permit
  674.         a full description,  but the subject is covered in detail in the
  675.         printed manual.
  676.  
  677.         In the absence of the full documentation the advice must be: try
  678.         it,  if the datatype is not permitted a suitable  error  message
  679.         will be generated.
  680. @end
  681. @nf i1
  682. @head centre,"Data Naming Conventions"
  683. @ban
  684. @border
  685.  
  686.         Names for user-defined datatypes
  687.  
  688.         Names for datatypes may consist of the following characters:
  689.           A-Z,  a-z,  0-9,  Underscore (_)
  690.  
  691.         The first character of a name must be alphabetic.
  692.  
  693.         Naturally,  some  users  prefer  to  give  meaningful  names  to
  694.         variables  and  this  may necessitate long names.   Use  of  the
  695.         underscore  character in long names can improve  readability  of
  696.         the task.  If used, underscore characters are significant,  that
  697.         is  to  say they must always be included wherever  the  name  is
  698.         used.
  699. @end
  700. @nf i2
  701. @head centre,"Datatype search order"
  702. @ban
  703. @border
  704.  
  705.         When  Taskmaster  scans  a command which requires  one  or  more
  706.         datatypes  to be present, it searches in a specific  order.  You
  707.         need to be aware of this to avoid ambiguity.
  708.  
  709.         The following example demonstrates the potential ambiguity.
  710.  
  711.         A variable called FILENAME is declared of length 10  characters,
  712.         used to contain a MS-DOS filename.  The DATA statement stacks up
  713.         characters  to be supplied to the next loaded program.  The  RUN
  714.         command loads the named program and enters it.
  715.  
  716.         VAR FILENAME,7,"AAA.IDX"
  717.         DATA FILENAME
  718.         RUN "PROGRAM"
  719.  
  720.         If  a variable called FILENAME had not been previously  defined,
  721.         Taskmaster would treat FILENAME as a string of characters.
  722. @end
  723. @nf i3
  724. @head centre,"Scanning order"
  725. @ban
  726. @border
  727.  
  728.         Taskmaster infers the datatype by scanning in the order below:
  729.  
  730.                 user-defined names,
  731.                 system_names,
  732.                 strings,
  733.                 literals,
  734.                 integer constants
  735.  
  736.         subject to allowable datatypes for the command.
  737. @end
  738. @nf i4
  739. @head centre,"Available memory"
  740. @ban
  741. @border
  742.  
  743.         Taskmaster has the capability to shrink down to approximately 2k
  744.         in  size when it loads another program using the LARGE  command.
  745.         This  small  residual  size will allow all but  the  largest  of
  746.         applications to be run.
  747. @end
  748. @nf me
  749. @head left,"SYSTEM VARIABLEs (one)"
  750. $P$
  751. @head centre,"Menu"
  752. @ban
  753. @border
  754.  
  755. @bbmenu white,red
  756.   {ANYFK    }
  757.   {ASKMASK  }
  758.   {BBDISP   }
  759.   {BBMASK   }
  760.   {more     }
  761.   {CHOICE   }
  762.   {DATE     }
  763.   {DELAY    }
  764.   {DDRIVE   }
  765.   {DELIM    }
  766.   {DISPLAY  }
  767.   {ECHO     }
  768.   {ELEVEL   }
  769. @col char,white,red
  770. @win line2,column14,depth13,width60
  771. Set  if any function key hit on  PUT  command
  772. Controls which special keys are active during ASK
  773. Controls re-display of menus on RETURN command
  774. Controls which special keys are active for PUT and MENU
  775. Diagram
  776. Set to indicate the choice made from Bounce-bar menu
  777. The Current System date
  778. Controls timing interval
  779. Default drive
  780. Defines delimiter for SCAN command
  781. Last Bounce-bar topic text or last DISPLAYLN text
  782. Controls echo of typed characters
  783. Set by BATCH files to value of ERRORLEVEL
  784. $A$
  785. @end
  786.  
  787.  
  788. @nf e1
  789. @head centre,"ANYFK  (read-only)"
  790. @ban
  791. @border
  792.  
  793.         This logical variable is reset on the execution of each PUT  and
  794.         MENU  command. It has the value TRUE if the user presses any  of
  795.         the function keys F1 to F11.
  796. @end
  797. @nf e2
  798. @head centre,"BBMASK / ASKMASK example:"
  799. @ban
  800. @border
  801.  
  802.         To activate the ESC key, F1, F10 and END:
  803.                 MOVE 0C021H TO BBMASK
  804.  
  805.         Note that the leading zero is only required where the first  hex
  806.         digit is non-numeric but the trailing H is mandatory.
  807.  
  808.         Diagrammatic representation for derivation of value of BBMASK in
  809.         the example given:
  810. @gon
  811.         7--------------8--------------8--------------8-------------9
  812.         0              0              0              0             0
  813.         0byte 0        0byte 1        0byte 2        0byte 3       0
  814.         4--------------5--------------5--------------5-------------6
  815.         0              0              0              0    pg pg    0
  816.         0ESC F1  F2  F30F4  F5  F6  F70F8  F9  F10  0   up dn end0
  817.         01   1   0   0 00   0   0   0 00   0   1    000   0   0   10
  818.         08 + 4 + 0 + 0 00 + 0 + 0 + 0 00 + 0 + 2 +  000 + 0 + 0 + 10
  819.         0C             00             02             01            0
  820.         1--------------2--------------2--------------2-------------3
  821.      Note: ASKMASK is similar to BBMASK but can only activate  function
  822.      keys  and  is  active  when  the  ASK  command  is   encountered.
  823.      Activated function keys can be detected using ANYFK and FUNKEY.
  824. @end
  825. @nf e3
  826. @head centre,"BBDISP   (read/write)"
  827. @ban
  828. @border
  829.  
  830.         This is a system logical variable with a default value = TRUE.
  831.  
  832.         Normally  upon return to a MENU or PUT command that was used  to
  833.         display a bounce-bar menu,  the bounce-bar menu is  redisplayed.
  834.         Although the display is swift, it can give rise to an  unsightly
  835.         flicker.   If  there is no reason to redisplay the  menu,   i.e.
  836.         that  part of the screen has not changed, you can  suppress  the
  837.         redisplay  by  clearing  BBDISP, i.e. setting it to  a  value  =
  838.         FALSE.
  839.  
  840.         The colour attributes of the highlighted bar will be reset  even
  841.         when the menu is not redisplayed.
  842.  
  843.         On  re-entry to the menu, BBDISP will automatically be reset  to
  844.         TRUE.
  845. @end
  846. @nf e4
  847. @head centre,"BBMASK  (read/write)"
  848. @ban
  849. @border
  850.  
  851.         If  you  are  using SCR bounce-bar menus, the  value  of  BBMASK
  852.         determines  which of the following keys (in addition to  RETURN)
  853.         will cause an exit from the MENU command:
  854.                 ESC
  855.                 F1 - F10
  856.                 LEFT ARROW
  857.                 RIGHT ARROW
  858.                 Page-up/Page-Down
  859.                 END
  860.  
  861.         BBMASK is an integer variable normally set with a command of the
  862.         form:
  863.                 MOVE vwxyH TO BBMASK
  864.  
  865.         where  vwxy  is  a  sequence  of  4  hex  digits  that  are  bit
  866.         significant:
  867.                 v determines ESC and F1 F2 and F3,
  868.                 w determines F4 - F7
  869.                 x determines F8 - F10 and LEFT Arrow
  870.                 y determines RIGHT ARROW, PG-UP, PG-DN and END.
  871. @end
  872. @nf e5
  873. @ban
  874. @border
  875. @gon
  876.  
  877.      7-----8---------------8------------------8--------------------9
  878.      0 Bit 0 Key           0 Option to        0 If CLEAR           0
  879.      0     0               0 execute if SET   0                    0
  880.      4-----5---------------5------------------5--------------------6
  881.      0 0   0 ESC           0 30               0 Ignore             0
  882.      0 1   0 F1            0 31               0 Ignore             0
  883.      0 2   0 F2            0 32               0 Ignore             0
  884.      0 3   0 F3            0 33               0 Ignore             0
  885.      0 4   0 F4            0 34               0 Ignore             0
  886.      0 5   0 F5            0 35               0 Ignore             0
  887.      0 6   0 F6            0 36               0 Ignore             0
  888.      0 7   0 F7            0 37               0 Ignore             0
  889.      0 8   0 F8            0 38               0 Ignore             0
  890.      0 9   0 F9            0 39               0 Ignore             0
  891.      0 10  0 F10           0 40               0 Ignore             0
  892.      0 11  0 Left arrow    0 41               0 highlight previous 0
  893.      0 12  0 Right arrow   0 42               0 highlight next     0
  894.      0 13  0 Page Up       0 43               0 Ignore             0
  895.      0 14  0 Page Down     0 44               0 Ignore             0
  896.      0 15  0 END           0 45               0 Ignore             0
  897.      1-----2---------------2------------------2--------------------3
  898. @end
  899. @nf e6
  900. $P$
  901. @head centre,"CHOICE (read/write) "
  902. @ban
  903. @border
  904.  
  905.         This integer variable is provided to enable you to determine the
  906.         number of the last menu-selection made via the MENU command.  It
  907.         is particularly useful in the following context:
  908.  
  909.         MENU 1,"MENU_NAME"
  910.  
  911.         OPTION 1,1
  912.         commands for option 1
  913.         OPTION 1,2
  914.         OPTION 1,3
  915.         IF CHOICE = 2
  916.           commands specific to option 2
  917.         FI
  918.         commands common to both options 2&3
  919.         IF CHOICE = 3
  920.           commands specific to option 3
  921.         FI
  922.         OPTION 1,4 etc...
  923. @win line5,column43,depth10,width34
  924. @draw
  925. >1<
  926.   If  you are using SCR  bounce-bar
  927.   menus, the value of CHOICE at the
  928.   time  the MENU command is  obeyed
  929.   dictates where the bounce bar  is
  930.   placed.   If the value of  CHOICE
  931.   corresponds  to  a  valid  option
  932.   number, the bar will be placed on
  933.   that  option.  Otherwise,  it  is
  934.   always   placed  on   the   first
  935.   option.
  936.                                   >1<
  937. @end
  938. @nf e7
  939. @head centre,"DATE (read-only) "
  940. @ban
  941. @border
  942.  
  943.         A  character  variable containing the current date in  the  form
  944.         DD/MM/YY, provided that the correct date has been set using  the
  945.         MS-DOS utility before loading.
  946.  
  947.         This  variable in common with LDATE and IDATE is set on  loading
  948.         Taskmaster.  However to overcome possible problems  caused  when
  949.         the system TIME passes 24:00 hrs they are reset whenever a
  950.  
  951.         MOVE DATE TO VARIABLE
  952.  
  953.         command is encountered.
  954.  
  955.         Date  changes are recognised automatically when menus and  forms
  956.         are  displayed  resulting  in  the  latest  date  always   being
  957.         displayed on the "userline".
  958. @end
  959. @nf e8
  960. @head centre,"DELAY  (read/write)"
  961. @ban
  962. @border
  963.  
  964.         This  system integer variable contains the number of  ticks  per
  965.         second. You may alter its value in order to adjust various time-
  966.         delays within Taskmaster.
  967. @end
  968. @nf e9
  969. @head centre,"DDRIVE  (read-only) "
  970. @ban
  971. @border
  972.  
  973.         This  read-only character variable is a single character in  the
  974.         range  A  through P which corresponds to  the  drive  identifier
  975.         letter relating to the currently selected drive.
  976.  
  977.         EXAMPLE
  978.  
  979.         If Taskmaster was invoked from the command line:
  980.  
  981.         C>TM FRED
  982.  
  983.         then  DDRIVE  would  contain the character "C"  which  could  be
  984.         referenced in the task called FRED.TSK
  985. @end
  986. @nf ea
  987. @head centre,"DELIM  (read/write) "
  988. @ban
  989. @border
  990.  
  991.         This  variable is used to define the delimiter used by the  SCAN
  992.         command.
  993. @end
  994. @nf eb
  995. @head centre,"DISPLAY  (read/write) "
  996. @ban
  997. @border
  998.  
  999.         This  character  variable  contains a copy  of  the  data   last
  1000.         displayed  using the DISPLAYLN command or the text of  the  last
  1001.         topic highlighted on a bounce-bar menu - whichever was the  most
  1002.         recent.
  1003. @end
  1004. @nf ec
  1005. @head centre,"ECHO  (read/write)"
  1006. @ban
  1007. @border
  1008.  
  1009.         When this logical variable is unset (to FALSE) it suppresses the
  1010.         display of characters entered at the keyboard in response to ASK
  1011.         commands.  It is particularly useful when asking  for  PASSWORDS
  1012.         etc.
  1013.  
  1014.         ECHO increases privacy when entering sensitive data. A  parallel
  1015.         facility  is provided for screen forms as described in  the  SCR
  1016.         manual, namely the inclusion of an exclamation mark as the first
  1017.         character within a box on the screen.
  1018. @end
  1019. @nf ed
  1020. @head centre,"ELEVEL (read/write)"
  1021. @ban
  1022. @border
  1023.  
  1024.         The value of the MS-DOS parameter ERRORLEVEL returned by  MS-DOS
  1025.         in  response  to  applications  loaded is  stored in  ELEVEL  on 
  1026.         return to Taskmaster.
  1027.  
  1028.         See the RUN command for further details.
  1029. @end
  1030. @nf mf
  1031. @head left,"SYSTEM VARIABLEs (two)"
  1032. $P$
  1033. @head centre,"Menu"
  1034. @ban
  1035. @border
  1036.  
  1037. @bbmenu white,red
  1038.   {FALSE    }
  1039.   {FCOL     }
  1040.   {FOUND    }
  1041.   {FREE     }
  1042.   {FUNKEY   }
  1043.   {HIDE     }
  1044.   {HILITE   }
  1045.   {KEY      }
  1046.   {KEYVAL   }
  1047.   {LDATE    }
  1048.   {RESP     }
  1049.   {more     }
  1050.   {ROW      }
  1051.   {SYSMAX   }
  1052.   {SYSFREE  }
  1053.   {TIME     }
  1054.   {TIMER    }
  1055.   {TRUE     }
  1056. @col char,white,red
  1057. @win line2,column14,depth18,width60
  1058. May be moved to a LOGICAL
  1059. Match position in "IF thing ct other_thing"
  1060. Returns result of many commands e.g. LOOKFOR
  1061. Reports free memory in task
  1062. The function key number if ANYFK set
  1063. Suppress display of program load command (RUN and LARGE)
  1064. On exit from Bounce-bar menu: The highlit topic  number
  1065. Set TRUE if key pressed during WAIT or INKEY
  1066. The character pressed resulting in KEY being set
  1067. Long format date
  1068. Returns response from many commands e.g. RUN
  1069. Summary of use
  1070. The entry number of match in "IF table ct thing"
  1071. The RAM configuration
  1072. Reports free memory in machine
  1073. Current system time
  1074. Sets timeout for forms and menus
  1075. May be moved to a Logical
  1076. $A$
  1077. @end
  1078.  
  1079. @nf f1
  1080. @head centre,"FALSE  (read-only) "
  1081. @ban
  1082. @border
  1083.  
  1084.         One  of two values which may be assigned to a LOGICAL  VARIABLE.
  1085.         The value may be tested using an IF command of the form:
  1086.  
  1087.                 IF logical_variable_name
  1088.  
  1089.         If  the value is FALSE, the result of the IF expression will  be
  1090.         FALSE.
  1091.  
  1092. @end
  1093. @nf f2
  1094. @head centre,"FCOL (read/write) "
  1095. @ban
  1096. @border
  1097.  
  1098.         This  integer  variable points to the first  matching  character
  1099.         located  by  FIND  and IF commands  and  all  other  conditional
  1100.         commands using the CONTAINS (CT) or STARTS (SW) operators.
  1101.  
  1102.  NOTE1  A value of 0 indicates a successful match at  the beginning of a
  1103.         string.
  1104.  
  1105.  NOTE2  The  value  of  FCOL  is  indeterminate  following  unsuccessful
  1106.         FIND commands.
  1107.  
  1108.  NOTE3  FCOL is evaluated during IF commands of the form:
  1109.  
  1110.                 IF datatype_1   CT
  1111.                                 SW datatype_2
  1112. @end
  1113. @nf f3
  1114. @head centre,"FOUND  (read/write) "
  1115. @ban
  1116. @border
  1117.  
  1118.         This is a system LOGICAL variable - summary of use
  1119. @gon
  1120.         7---------------------------------------8---------9
  1121.         0 EVENT                                 0 COMMAND 0
  1122.         4---------------------------------------5---------6
  1123.         0 Scanning variables and items          0 SCAN    0
  1124.         0 Finding a file                        0 LOOKFOR 0
  1125.         0 Finding a file                        0 DIR     0
  1126.         0 Finding entries in table-of-var       0 FIND    0
  1127.         0 Reading a Volume label                0 GETVOL  0
  1128.         0 Sub-linear string operations          0 IF      0
  1129.         1---------------------------------------2---------3
  1130. @end
  1131. @nf f4
  1132. @head centre,"FREE  (read-only)"
  1133. @ban
  1134. @border
  1135.  
  1136.         This  integer variable contains a number which is the amount  of
  1137.         free  memory at any given point in a task.  It may only be  used
  1138.         in conjunction with the DISPLAY or DISPLAYLN commands, e.g.
  1139.  
  1140.         DISPLAYLN "Free memory " FREE
  1141. @end
  1142. @nf f5
  1143. @head centre,"FUNKEY (read-only)"
  1144. @ban
  1145. @border
  1146.  
  1147.         This  integer  variable  is set when you press  a  function  key
  1148.         whilst  a  FORM  or  MENU is displayed  instead  of  the  normal
  1149.         <RETURN>.  If return is pressed then FUNKEY will have a value of
  1150.         zero.    If a function key numbered 1 - 11 is pressed the  value
  1151.         of FUNKEY will be set to the corresponding value.
  1152.  
  1153. @end
  1154. @nf f6
  1155. @head centre,"HIDE  (read/write)"
  1156. @ban
  1157. @border
  1158.  
  1159.         This logical variable when set (to TRUE) suppresses the  command
  1160.         line  display usually seen when executing programs via  the  RUN
  1161.         command. The default is FALSE.
  1162.  
  1163.         HIDE  enables  command parameters to be hidden  from  the  user,
  1164.         which can be important in certain situations.
  1165. @end
  1166. @nf f7
  1167. @head centre,"HILITE  (read-only)"
  1168. @ban
  1169. @border
  1170.  
  1171.         This  system  integer  variable contains  the  position  of  the
  1172.         currently highlighted bar of the currently displayed  bounce-bar
  1173.         menu.   When  a key is pressed which causes an escape  from  the
  1174.         menu,  i.e.  RETURN, ESC,  Function keys,  cursor left or right,
  1175.         the  value  of  CHOICE is set to identify the  key  pressed  and
  1176.         HILITE will contain the option number currently highlighted.
  1177.  
  1178.         When  a  highlighted option is selected by pressing  the  return
  1179.         key, both CHOICE and HILITE will contain the same value.
  1180. @end
  1181. @nf f8
  1182. @head centre,"KEY (read/write)"
  1183. @ban
  1184. @border
  1185.  
  1186.         Updated  after  PUT and  WAIT commands when specifying  a  delay
  1187.         period and by the INKEY command.
  1188.  
  1189.         When  using the PUT and WAIT commands the value of this  logical
  1190.         variable  enables  the user to recognise if a keyboard  key  was
  1191.         pressed during the delay period, causing the delay to  terminate
  1192.         prematurely.
  1193.  
  1194.         When  using the INKEY command without a parameter, checking  the
  1195.         value of KEY will determine if a break-in has been requested.
  1196.  
  1197.         See also KEYVAL.
  1198.  
  1199. @end
  1200. @nf f9
  1201. @head centre,"KEYVAL  (read/write)"
  1202. @ban
  1203. @border
  1204.  
  1205.         This  character variable is provided for use in connection  with
  1206.         the logical variable KEY.
  1207.  
  1208.         It contains the value of the keyboard character depressed  which
  1209.         resulted in KEY being set to TRUE.
  1210.  
  1211.         It  will be set if you press a key during any of  the  following
  1212.         commands:
  1213.  
  1214.                 PUT "FORM_NAME" WAIT n
  1215.                 WAIT n
  1216.                 WAIT
  1217.  
  1218. @end
  1219. @nf fa
  1220. @head centre,"LDATE  (read-only) "
  1221. @ban
  1222. @border
  1223.  
  1224.         The  long  format  date. A  character  variable  containing  the
  1225.         current date in calendar date format, i.e.
  1226.  
  1227.         DD MMM YYYY
  1228.  
  1229.         where
  1230.  
  1231.         DD  is the day of the month,
  1232.         MMM is the month, e.g. MAR, SEP,
  1233.  
  1234.         and  YYYY is the year, e.g. 1990.
  1235. @end
  1236. @nf fb
  1237. @head centre,"RESP  (read-only) "
  1238. @ban
  1239. @border
  1240.  
  1241.         This integer variable is set by MS-DOS during the execution of
  1242.         various commands.  A value of zero normally indicates SUCCESS.
  1243. @gon
  1244.         7-----------------------------------8---------------9
  1245.         0 EVENT                             0 COMMAND       0
  1246.         4-----------------------------------5---------------6
  1247.         0 Searching for a file              0 LOOKFOR       0
  1248.         0 Searching for a file              0 DIR           0
  1249.         0 Attaching a LIST device           0 PRINTER       0
  1250.         0 Creating a file for DATA          0 BEHAVE        0
  1251.         0 Writing to a DATA file            0 DATA          0
  1252.         0 Assigning a default drive         0 SELECT        0
  1253.         0 String Replacement                0 REPLACE       0
  1254.         0 User specified TIME-OUTS          0 MENU, PUT     0
  1255.         0 Loading a program                 0 RUN/LARGE     0 See next page
  1256.         0 Erasing a file                    0 ERASE         0
  1257.         0 Taskmaster login                  0 LOGIN         0
  1258.         0 Reading/Writing to files          0 RESTORE/SAVE  0
  1259.         0 Changing directory                0 USER          0
  1260.         0 Opening the EUC Catalogue         0 CATALOG       0
  1261.         0 Changing users Password           0 PASSWORD      0
  1262.         1-----------------------------------2---------------3
  1263. @end
  1264. @nf fc
  1265. @ban
  1266. @border
  1267.  
  1268.         The following responses may be returned in RESP
  1269. @gon
  1270.         7-----------8------8---------------------------------------------9
  1271.         0 COMMAND   0 RESP 0 MEANING                                     0
  1272.         4-----------5------5---------------------------------------------6
  1273.         0 RUN/LARGE 0   0  0 Success                                     0
  1274.         0 RUN/LARGE 0   2  0 Invalid COMSPEC or C:\COMMAND.COM not found 0
  1275.         0 RUN/LARGE 0   5  0 Access denied to COMMAND.COM or COMSPEC     0
  1276.         0 LARGE     0   6  0 Unable to create swap file                  0
  1277.         0 LARGE     0   7  0 Disc write error on swap file               0
  1278.         0 RUN/LARGE 0   8  0 Insufficient memory available               0
  1279.         0 RUN/LARGE 0  10  0 Environment invalid                         0
  1280.         0 RUN/LARGE 0  11  0 Taskmaster internal error or system corrupt 0
  1281.         1-----------2------2---------------------------------------------3
  1282.         Some  responses result in an error message and wait for a  key
  1283.         to  be  pressed.   None of the above are  fatal  errors,  task
  1284.         execution continuing at the next command.
  1285.  
  1286.         It is important to check the response in your tasks !
  1287. @end
  1288. @nf fd
  1289. @head centre,"ROW (read-only) "
  1290. @ban
  1291. @border
  1292.  
  1293.         This is an integer variable used when searching tables. See  the
  1294.         section on the FIND command for detailed information.
  1295. @end
  1296. @nf fe
  1297. @head centre,"SYSMAX (read-only)"
  1298. @ban
  1299. @border
  1300.  
  1301.         This integer variable contains the size of the computer's  basic
  1302.         memory in Kilobytes.  This excludes any extended memory that may
  1303.         be present.  This is normally 640.
  1304. @end
  1305. @nf ff
  1306. @head centre,"SYSFREE (read-only)"
  1307. @ban
  1308. @border
  1309.  
  1310.         SYSFREE is a variable containing the characters nnnK, where  nnn
  1311.         is the number of Kilobytes of free basic memory available at any
  1312.         given time.
  1313.  
  1314.         The  figure  of free memory represents the amount  of  available
  1315.         memory  for  loading other programs and takes into  account  any
  1316.         residual memory requirements of Taskmaster.
  1317.  
  1318.         This  variable is most often used as an insert in the  main-menu
  1319.         of tasks that serve to load and run other programs, e.g.
  1320.                 MENU 1,'MAIN-MENU',SYSFREE
  1321.  
  1322.         This  causes substitution of the character string "nnnK" at  the
  1323.         position in an SCR generated Menu between "curly braces".
  1324. @end
  1325. @nf fg
  1326. @head centre,"TIME (read-only)"
  1327. @ban
  1328. @border
  1329.  
  1330.         A  character  variable containing the current time in  the  form
  1331.         HH:MM:SS, provided that the system DATE/TIME utility was used to
  1332.         set the correct time.
  1333.  
  1334.         This  variable is extremely useful, since it allows work  to  be
  1335.         scheduled for running at any time of the day, e.g.
  1336.  
  1337.         UNTIL TIME STARTS "10:0"
  1338.           WAIT 60
  1339.         FI
  1340.         RUN "PROGRAM"
  1341.  
  1342.         Note that the WAIT command will not waste processor resource  on
  1343.         multi-tasking operating systems.
  1344. @end
  1345. @nf fh
  1346. @head centre,"TIMER  (read/write)"
  1347. @ban
  1348. @border
  1349.  
  1350.         This integer variable is used to control optional timeouts  from
  1351.         MENUS  and  FORMS.  To  activate  a timeout for a form  or  menu 
  1352.         simply  move a numeric value to TIMER before  the  PUT  or  MENU 
  1353.         command.  
  1354.  
  1355.         Unless you have changed DELAY, the value will specify a time  in 
  1356.         seconds.  During   periods  of  keyboard  inactivity  the  timer 
  1357.         value  will count down and if it reaches zero before  a  key  is  
  1358.         pressed a timeout will occur.  The timeout will reset  each time 
  1359.         a key is pressed.  For a MENU command timeout, control will pass 
  1360.         to option 99.  For a PUT command timeout, the value  99 will  be 
  1361.         set in RESP.
  1362.  
  1363.         Taskmaster  automatically uses the appropriate  value  of  TIMER 
  1364.         for each menu even when returning to higher level  menus  (using 
  1365.         the RETURN n syntax variant).
  1366.  
  1367.         Timeouts are used in several of the example tasks.
  1368. @end
  1369. @nf fi
  1370. @head centre,"TRUE (read-only) "
  1371. @ban
  1372. @border
  1373.  
  1374.         One  of two values which may be assigned to a LOGICAL  VARIABLE.
  1375.         The value may be tested using an IF command of the form:
  1376.  
  1377.         IF logical_variable_name
  1378.  
  1379.         If  the value is TRUE, the result of the IF expression  will  be
  1380.         TRUE.
  1381. @end
  1382. @nf m1
  1383. @head left,"Arithmetic commands"
  1384. $P$
  1385. @head centre,"Menu"
  1386. @ban
  1387. @border
  1388.  
  1389. @bbmenu white,red
  1390.   {ADD       }
  1391.   {DECREMENT }
  1392.   {DIVIDE    }
  1393.   {INCREMENT }
  1394.   {MULTIPLY  }
  1395.   {SUBTRACT  }
  1396. @col char,white,red
  1397. @win line2,column14,depth6,width60
  1398. Add 2 integers
  1399. Take 1 from an integer
  1400. Divides one integer by another
  1401. Add 1 to an integer
  1402. Multiplies one integer by another
  1403. Subtract one integers from another
  1404. $A$
  1405. @end
  1406. @nf 11
  1407. @head centre,"The ADD command"
  1408. @ban
  1409. @border
  1410.  
  1411.  PURPOSE        Adds   two  datatypes placing the result in   the   second
  1412.                 datatype  or optionally in a third datatype.
  1413.  
  1414.  $X$ ADD datatype-1 TO datatype-2  {{GIVING  datatype-3}}
  1415.  
  1416.                 where:
  1417.                 datatype-1, dataype-2 and dataype-3 are integers.
  1418.  
  1419.  $Y$ The   datatype  to  recieve  the  result  (datatype-2   or
  1420.                 datatype-3 if present) must be an INT variable.
  1421.  
  1422.  NOTE2          Adding 1 to an INT variable is best achieved by using  the
  1423.                 INCREMENT command on grounds of performance.
  1424. @end
  1425. @nf 12
  1426. @head centre,"The DECREMENT command"
  1427. @ban
  1428. @border
  1429.  
  1430.  PURPOSE        Decrements the value of one or more INT variables by 1.
  1431.  
  1432.  $X$ DECREMENT int {{int ...}}
  1433.  
  1434.  $Y$ DECREMENT thing is preferred to:
  1435.                 SUBTRACT 1 FROM thing
  1436.  
  1437.                 on grounds of performance and economy of memory.
  1438.  
  1439.  NOTE2          If  more than one INT variable is  specified,  they should
  1440.                 be separated by spaces.
  1441.  
  1442.  NOTE3          A given INT var may be named more than once.
  1443.  
  1444.  $V$ DECREMENT COUNT INDEX
  1445.  EXAMPLE2       DECREMENT COUNT COUNT FRED
  1446. @end
  1447. @nf 13
  1448. @head centre,"The DIVIDE command"
  1449. @ban
  1450. @border
  1451.  
  1452.  PURPOSE        Divides  one  datatype  by another placing the  result  in
  1453.                 the first datatype.
  1454.  
  1455.  $X$ DIVIDE datatype-1 BY datatype-2
  1456.  
  1457.                 where:
  1458.                 datatype-1 and dataype-2 are integers.
  1459.  
  1460.  $Y$ The remainder if any will be placed in RESP.
  1461. @end
  1462. @nf 14
  1463. @head centre,"The INCREMENT command"
  1464. @ban
  1465. @border
  1466.  
  1467.  PURPOSE        Increments the value of one or more INT variables by 1.
  1468.  
  1469.  $X$ INCREMENT int {{int...}}
  1470.  
  1471.  $Z$ This   command  is preferable to using the   ADD   command
  1472.                 because it is faster.
  1473.  
  1474.  $V$ Display text on lines 10 to 19 of the screen:
  1475.  
  1476.                 CLEAR I
  1477.                 MOVE 10 TO J
  1478.                 UNTIL I = 10
  1479.                   CURSOR J 0 TEST
  1480.                   INCREMENT J
  1481.                 FI I
  1482. @end
  1483. @nf 15
  1484. @head centre,"The MULTIPLY command"
  1485. @ban
  1486. @border
  1487.  
  1488.  PURPOSE        Multiplies one  datatype  by another placing the result in
  1489.                 the first datatype.
  1490.  
  1491.  $X$ MULTIPLY datatype-1 BY datatype-2
  1492.  
  1493.                 where:
  1494.                 datatype-1 and dataype-2 are integers.
  1495. @end
  1496. @nf 16
  1497. @head centre,"The SUBTRACT command"
  1498. @ban
  1499. @border
  1500.  
  1501.  PURPOSE        Subtracts  one datatype from a second datatype placing the
  1502.                 result  in the second datatype or optionally  in  a  third
  1503.                 datatype.
  1504.  
  1505.  $X$ SUBTRACT datatype-1 FROM datatype-2 {{GIVING datatype-3}}
  1506.  
  1507.                 where:
  1508.                  datatype-1, dataype-2 and datatype-3 are integers.
  1509.  
  1510.  $Z$ The  DECREMENT  command is provided as an  alternative  to
  1511.                 "SUBTRACT 1".
  1512.  
  1513.  $V$ SUBTRACT 11 FROM COUNT
  1514. @end
  1515. @nf m2
  1516. @head left,"Data manipulation"
  1517. $P$
  1518. @head centre,"Menu"
  1519. @ban
  1520. @border
  1521.  
  1522. @bbmenu white,red
  1523.   {APPEND   }
  1524.   {COMBINE  }
  1525.   {DECODE   }
  1526.   {ENCODE   }
  1527.   {FIND     }
  1528.   {MOVE     }
  1529.   {REPLACE  }
  1530.   {REVERSE  }
  1531.   {SCAN     }
  1532.   {SETSCAN  }
  1533.   {TRIM     }
  1534.   {UPPER    }
  1535. @col char,white,blue
  1536.  
  1537.  (See the Data Initialisation Menu for CLEAR and SIZEVAR)
  1538. @col char,white,red
  1539. @win line2,column14,depth12,width60
  1540. Appends data to end
  1541. Combination of datatypes
  1542. Decodes encrypted data
  1543. Data encryption
  1544. Table searching
  1545. Data manipulation
  1546. String manipulation
  1547. Date manipulation for sorting
  1548. Data extraction
  1549. Data extraction
  1550. Removes trailing spaces
  1551. Forces characters to UPPER CASE
  1552. $A$
  1553. @end
  1554. @nf 21
  1555. @head centre,"The APPEND command"
  1556. @ban
  1557. @border
  1558.  
  1559.  PURPOSE        To  append the contents of a list of datatypes to  a  var.
  1560.                 The command has similarities with the COMBINE command.
  1561.  
  1562.  $X$ APPEND standard_list_of_datatypes TO var
  1563.  
  1564.  $Z$ Truncation  will occur if the receiving var is  not  large
  1565.                 enough to receive the list_of_datatypes.
  1566.  
  1567.  $V$ APPEND 40 "Page " PAGE_COUNT TO TITLE
  1568.  
  1569.                 If  var TITLE contains "SUMMARY" and int PAGE_COUNT =  25,
  1570.                 then on completion of this example it will contain
  1571.  
  1572.                 SUMMARY                                        Page    25
  1573. @end
  1574. @nf 22
  1575. @head centre,"The COMBINE command"
  1576. @ban
  1577. @border
  1578.  
  1579.  PURPOSE        Concatenates a list-of-datatypes into a single datatype.
  1580.  
  1581.  $X$ COMBINE standard_list_of_datatypes INTO datatype-2
  1582.  
  1583.  $Y$ Datatype-2  must  have  been   previously defined  and  be
  1584.                 of  type VAR with a length greater than or equal  to   the
  1585.                 combined lengths of the list_of_datatypes.
  1586.  
  1587.  NOTE2          If   the combined length of all the datatypes  is  greater
  1588.                 than  the declared size of datatype-2, characters will  be
  1589.                 moved until datatype-2 is full.
  1590. @end
  1591. @nf 23
  1592. @head centre,"The DECODE command "
  1593. @ban
  1594. @border
  1595.  
  1596.  PURPOSE        To  decode data which has been encrypted using the  ENCODE
  1597.                 command.
  1598.  
  1599.  $X$ DECODE var USING key
  1600.  
  1601.                 where data is type VAR.
  1602.                       key  is type VAR.
  1603.  
  1604.  $Y$ Can  be used as the basis of very  sophisticated  security
  1605.                 systems  as it would be extremely difficult to  break  the
  1606.                 encryption code.
  1607.  
  1608.  NOTE2          This  command is complementary to the  ENCODE  command.
  1609. @end
  1610. @nf 24
  1611. @head centre,"The ENCODE command"
  1612. @ban
  1613. @border
  1614.  
  1615.  PURPOSE        To encrypt data using a key supplied by the user.
  1616.  
  1617.  $X$ ENCODE data USING key
  1618.  
  1619.                 where data is type VAR.
  1620.                       key  is type VAR.
  1621. @end
  1622. @nf 25
  1623. @head centre,"The FIND command"
  1624. @ban
  1625. @border
  1626.  
  1627.  PURPOSE        Finds  an entry in a table of VAR, containing a  specified
  1628.                 character pattern.
  1629.  
  1630.  $X$ FIND table-of-VAR  comparison {{CASE}} var
  1631.                                                       literal
  1632. @gon
  1633.         Where comparison:       7------------------------------8--------9
  1634.                                 0startswith                    0SW      0
  1635.                                 0contains                      0CT      0
  1636.                                 0equals                        0= or EQ 0
  1637.                                 0greater than                  0> or GT 0
  1638.                                 0less than                     0< or LT 0
  1639.                                 0greater than or equal to      0>= or GE0
  1640.                                 0less than or equal to         0<= or LE0
  1641.                                 0not equal to                  0<> or NE0
  1642.                                 1------------------------------2--------3
  1643. @goff
  1644.  $Y$ CASE should be specified when case is significant.
  1645.  
  1646.  NOTE2          FOUND will indicate success or failure.  If TRUE then  ROW
  1647.                 indicates matching entry number.
  1648.  
  1649.  NOTE3          The  tilde character  "~"  matches any character.
  1650. @end
  1651. @nf 26
  1652. $P$
  1653. @head centre,"The MOVE command"
  1654. @ban
  1655. @border
  1656.  
  1657.  PURPOSE
  1658.  
  1659.  Moves data from one datatype to another.
  1660.  
  1661.  $X$
  1662.  
  1663.  MOVE datatype-1  TO
  1664.       datatype-2 {{WITH LEAD_ZEROES}}
  1665.  Where:
  1666.       datatype-1  and datatype-2 are
  1667.       any valid combination see table:
  1668.  
  1669.       Valid MOVE commands are shown
  1670.       in the table:
  1671. @win  line2,column45,depth21,width30
  1672. @gon
  1673. 7--------------8-------------9
  1674. 0  datatype-1  0  datatype-2 0
  1675. 4--------------5-------------6
  1676. 0   VAR        0   VAR       0
  1677. 0              0   INT       0
  1678. 0              0   LOGICAL   0
  1679. 4--------------5-------------6
  1680. 0   LITERAL    0   VAR       0
  1681. 4--------------5-------------6
  1682. 0   INT        0   VAR       0
  1683. 0              0   INT       0
  1684. 4--------------5-------------6
  1685. 0   SYSTEM var 0   VAR       0
  1686. 0              0   LOGICAL   0
  1687. 0              0   INT       0
  1688. 4--------------5-------------6
  1689. 0   LOGICAL    0   VAR       0
  1690. 0              0   LOGICAL   0
  1691. 4--------------5-------------6
  1692. 0   VCONST     0   VAR       0
  1693. 1--------------2-------------3
  1694. @end
  1695. @nf 27
  1696. @head centre,"The REPLACE command "
  1697. @ban
  1698. @border
  1699.  
  1700.  PURPOSE        Allows replacement of 1st or all occurences of  a sequence 
  1701.                 of characters within a VAR with another.
  1702.  
  1703.  $X$ REPLACE {{ALL}} VAR-1 OF VAR-2 with VAR-3
  1704.  
  1705.  $Y$ Scans from left to right for VAR-1 within VAR-2, if  found
  1706.                 sets FOUND and replaces VAR-1 with VAR-3.
  1707.  
  1708.  NOTE2          If keyword ALL present all occurances will be replaced.
  1709.  
  1710.  NOTE3          The  size or VAR-2 may be changed by this command, if  its
  1711.                 declared  size is reached without full  replacement  being
  1712.                 possible OVERFLOW will be set.
  1713.  
  1714.  NOTE4          RESP indicates number of replacements.
  1715.  
  1716.  NOTE5          VAR-3 may be {{NULL}}, this deletes VAR-1 from VAR-2.
  1717.  
  1718.  NOTE6          VAR-1 may be same as VAR-3 to perform counting in RESP.
  1719. @end
  1720.  
  1721. @nf 28
  1722. @head centre,"The REVERSE command"
  1723. @ban
  1724. @border
  1725.  
  1726.  PURPOSE        This command is primarily for use with UK format dates  in
  1727.                 the form:
  1728.                          dd/mm/yy    to the form    yy/mm/dd
  1729.  
  1730.                 The   REVERSE  command  performs  this   reformatting   by
  1731.                 swapping  the  first  two characters  with  the  last  two
  1732.                 characters.
  1733.  
  1734.                 For  US  format dates we suggest use of SCAN  and  COMBINE
  1735.                 commands.
  1736.  
  1737.  $X$ REVERSE variable
  1738.  
  1739.  $Y$ The   length  of  the datatype can  be  greater   than   8
  1740.                 characters    if  desired.    If  it  is  less   than    8
  1741.                 characters, no action is performed.
  1742.  
  1743.  NOTE2          The   effect  of  the  command is  ALWAYS  to   swap   the
  1744.                 contents of Bytes 0/1 with Bytes 6/7.
  1745. @end
  1746. @nf 29
  1747. @head centre,"The SCAN command"
  1748. @ban
  1749. @border
  1750.  
  1751.  PURPOSE        Extracts fixed or variable length data from a var  placing
  1752.                 it  in other var(s). In order to extract  variable  length
  1753.                 data,  the character used to delimit (separate)  the  data
  1754.                 must be specified.  When  extracting data into a variable,
  1755.                 the  amount  of data extracted may depend on  the  current
  1756.                 size of the variable.
  1757.  
  1758.  $X$ SCAN list of vars
  1759.  
  1760.  $Y$ In  order  to  use this command, you  must  first  of  all
  1761.                 specify  the  data area you want to scan.   This  area  is
  1762.                 nominated using the SETSCAN command.
  1763.  NOTE2          The  end  of data extracted is determined  either  by  the
  1764.                 current length of the datatype given or the location of  a
  1765.                 termination  character (delimiter).  The delimiter is  the
  1766.                 value  of  the system variable DELIM which has  a  default
  1767.                 value of COMMA.
  1768.  NOTE3          In  order to extract fixed length data items,  you  should
  1769.                 give the system variable DELIM a value of ZERO, i.e.
  1770.                 MOVE ZERO TO DELIM
  1771. @end
  1772. @nf 2a
  1773. @head centre,"The SETSCAN command"
  1774. @ban
  1775. @border
  1776.  
  1777.  PURPOSE        Nominates a var to be scanned using the SCAN command.
  1778.  
  1779.  $X$ SETSCAN var  {{start position}}
  1780.  
  1781.  $Y$ You  can  supply an OPTIONAL starting  offset  within  the
  1782.                 variable being scanned.  This is a start position relative
  1783.                 to  byte  0  of the datatype and must be the  name  of  an
  1784.                 integer variable or an integer constant.
  1785.  
  1786.  NOTE2          An  error will be reported if you specify a starting  byte
  1787.                 which is outside the bounds of the variable or item.
  1788.  
  1789.  $V$ If  a  variable  X is defined as:
  1790.                 VAR  X,13,"The brown cow"
  1791.                 then  the  following  commands extract  "brown"  into  the
  1792.                 variable Y:
  1793.  
  1794.                 SETSCAN X 4
  1795.                 CLEAR DELIM
  1796.                 SCAN Y
  1797. @end
  1798. @nf 2b
  1799. @head centre,"The TRIM command"
  1800. @ban
  1801. @border
  1802.  
  1803.  PURPOSE        Trims trailing spaces from one or more vars.
  1804.  
  1805.  $X$ TRIM  var {{var ...}}
  1806.  
  1807.  $Y$ This    command  is  particularly  useful   for   removing
  1808.                 trailing   spaces  from data which has been input   to   a
  1809.                 form and obtained via the GET command.  Unprotected fields
  1810.                 declared  in a form will usually  be keyed into from  left
  1811.                 to  right.   As is often the  case, the  amount  of   data
  1812.                 entered  will be  less  than  the maximum   permitted  and
  1813.                 during subsequent processing  of the  data,  it  may   not
  1814.                 be  desirable  to  perpetuate unwanted space characters.
  1815.  
  1816.  NOTE2          The  command  will  reset the current size of  a  var,  if
  1817.                 trailing spaces exist.
  1818.  
  1819.  NOTE3          If  the  var contains only spaces,  trim will  generate  a
  1820.                 {{NULL}} variable.
  1821. @end
  1822. @nf 2c
  1823. @head centre,"The UPPER command"
  1824. @ban
  1825. @border
  1826.  
  1827.  PURPOSE        Forces characters to UPPER CASE.
  1828.  
  1829.  $X$ UPPER  var
  1830.  
  1831. @end
  1832. @nf m3
  1833. @head left,"Conversational-mode Commands"
  1834. $P$
  1835. @head centre,"Menu"
  1836. @ban
  1837. @border
  1838.  
  1839. @bbmenu white,red
  1840.   {ASK      }
  1841.   {ASKLN    }
  1842.   {INKEY    }
  1843. @col char,white,red
  1844. @win line2,column14,depth3,width60
  1845. Display a message - get user input (into VAR or LOGICAL)
  1846. As ASK but newline before prompt.
  1847. Raw data capture - Get a character - or test for one.
  1848. $A$
  1849. @end
  1850.  
  1851. @nf 31
  1852. @head centre,"The ASK command"
  1853. @ban
  1854. @border
  1855.  
  1856.  PURPOSE        Prompts  the  user with a question and  obtains  a  reply.
  1857.                 The  reply  may  be either a string  of  characters  or  a
  1858.                 YES/NO  answer.  The prompt character is a "greater  than"
  1859.                 sign.
  1860.  
  1861.  $X$ ASK var/logical standard_list_of_datatypes
  1862.  
  1863.  $Y$ Carriage return actions this command.
  1864.  
  1865.  NOTE2          Editing ASK command data:
  1866.                 CTRL/X  may  be used to cancel any data  already  entered.
  1867.                 Backspace  and cursor left keys delete the last  character
  1868.                 input.
  1869.  NOTE3          Screen  output is directed through the VT52  driver,  i.e.
  1870.                 like the DISPLAY command.
  1871.  
  1872.  $V$ VAR FILE,14
  1873.                 ASKLN FILE "Which file would you like to edit ?"
  1874.                 RUN "WS " FILE
  1875. @end
  1876. @nf 32
  1877. @head centre,"The ASKLN command"
  1878. @ban
  1879. @border
  1880.  
  1881.  PURPOSE        As   for  the  ASK  command,   but  displays  the   prompt
  1882.                 character  ">" in column 0 of the next line following  the
  1883.                 standard list of datatypes. 
  1884.  
  1885.  NOTE           Screen  output  is  directed via  MS-DOS,  i.e.  like  the
  1886.                 DISPLAYLN command.
  1887. @end
  1888. @nf 33
  1889. @head centre,"The INKEY command"
  1890. @ban
  1891. @border
  1892.  
  1893.  PURPOSE        Obtains  a keyboard character and stores it in a  var   or
  1894.                 table-of-var,   with  default  lower  case to upper   case
  1895.                 character conversion.
  1896.  
  1897.  $X$ INKEY {{var or table-of-var entry}} {{CASE}}
  1898.  
  1899.  $Y$ The   optional  keyword CASE should be included  only   if
  1900.                 you do not want lower case characters to be converted.
  1901.  
  1902.  NOTE2          The command causes Taskmaster to be suspended until a  key
  1903.                 is depressed - but See Note 3.
  1904.  
  1905.  NOTE3          If  no variable or table name is given then  INKEY   polls
  1906.                 the   keyboard  for a character.  If a character  is   not
  1907.                 available  then the command has no effect and  the  system
  1908.                 logical variable KEY is set to FALSE.
  1909.                 If   a key has been pressed however, the system   variable
  1910.                 KEYVAL  will be set to the value of the key  pressed   and
  1911.                 the   system  logical variable KEY will be set  to   TRUE.
  1912.                 This   is  useful to enable  break-in  during   repetitive
  1913.                 screen displays,  or flush the keyboard buffer.
  1914. @end
  1915. @nf m4
  1916. @head left,"Video handling commands"
  1917. $P$
  1918. @head centre,"Menu"
  1919. @ban
  1920. @border
  1921.  
  1922. @bbmenu white,red
  1923.   {BACK     }
  1924.   {CURSOR   }
  1925.   {DISPLAY  }
  1926.   {DISPLAYLN}
  1927.   {DRAW     }
  1928.   {FORE     }
  1929.   {LOCATE   }
  1930.   {POPDOWN  }
  1931.   {POPFREE  }
  1932.   {POPGET   }
  1933.   {POPUP    }
  1934.   {SCANVID  }
  1935.   {SCREEN   }
  1936.   {SWITCH   }
  1937.   {USERLINE }
  1938. @col char,white,blue
  1939.  
  1940.  (See the SWITCH command for notes on POPSCREEN)
  1941. @col char,white,red
  1942. @win line2,column14,depth15,width60
  1943. For selecting background colour
  1944. Position cursor and display message
  1945. Display data or text
  1946. Display text then newline - Store in DISPLAY sysvar
  1947. Draws a line graphic shape
  1948. Selects foreground colour by number
  1949. Returns position of cursor into 2 INTegers
  1950. Restores data beneath pop-up
  1951. Frees memory used by POPUP, returns it to the POPUP pool
  1952. Stores screen area defined in last @WINDOW in POPUP pool
  1953. Overlays part of screen from VARiable table
  1954. Returns a line from the screen
  1955. Directs data to specific screen
  1956. Selects the screen page
  1957. Writes to line 25 of video
  1958. $A$
  1959. @end
  1960. @nf 41
  1961. $P$
  1962. @head centre,"The BACK command"
  1963. @ban
  1964. @border
  1965.  
  1966.      The   BACK   command   sets   the
  1967.      background colour and  foreground
  1968.      flashing attribute.  Please refer
  1969.      also   to  the  section  on   the
  1970.      complementary FORE command.
  1971.  
  1972.  $X$
  1973.      BACK attribute
  1974. @GON
  1975. @win line2,column44,depth20,width31
  1976. 7----8------------------------9
  1977. 0    0 foreground  background 0
  1978. 4----5------------------------6
  1979. 0 0  0     Steady    Black     0
  1980. 0 1  0    Steady    Blue      0
  1981. 0 2  0    Steady    Green     0
  1982. 0 3  0    Steady    Cyan      0
  1983. 0 4  0    Steady    Red       0
  1984. 0 5  0    Steady    Magenta   0
  1985. 0 6  0    Steady    Brown     0
  1986. 0 7  0    Steady    White     0
  1987. 0 8  0   Flashing    Black     0
  1988. 0 9  0  Flashing    Blue      0
  1989. 0 10 0  Flashing    Green     0
  1990. 0 11 0  Flashing    Cyan      0
  1991. 0 12 0  Flashing    Red       0
  1992. 0 13 0  Flashing    Magenta   0
  1993. 0 14 0  Flashing    Brown     0
  1994. 0 15 0  Flashing    White     0
  1995. 1----2------------------------3
  1996. @end
  1997. @nf 42
  1998. @head centre,"The CURSOR command"
  1999. @ban
  2000. @border
  2001.  
  2002.  PURPOSE        Positions  the  cursor according to  supplied  screen  co-
  2003.                 ordinates and optionally displays data at that position.
  2004.  
  2005.  
  2006.  $X$ CURSOR Line Column {{standard_list_of_datatypes}}
  2007.  
  2008.  EXAMPLE        CURSOR 10 20 "Invalid option " OPTION
  2009.  
  2010. @end
  2011. @nf 43
  2012. @head centre,"The DISPLAY command"
  2013. @ban
  2014. @border
  2015.  
  2016.  PUROSE         To   send data to the video via the VT52 interface  and/or
  2017.                 to change the attributes of the screen.
  2018.  
  2019.  $X$ DISPLAY standard_list_of_datatypes
  2020.  
  2021.  $Y$ This  command is intended primarily to be used when  it is
  2022.                 required to send character control sequences to the video,
  2023.                 for   example,   to  clear to end of  line,    clear   the
  2024.                 screen etc.
  2025.  
  2026.  NOTE2          DISPLAY  commands differ from DISPLAYLN commands  in  that
  2027.                 the  output is directed through the VT52  interface.  Thus
  2028.                 prevailing screen attributes such as colour will apply.
  2029.  
  2030.                 The   best way to drive the video for all but   the   most
  2031.                 unconventional    requirements  is  to    DISPLAY    video
  2032.                 constants   -  refer  to the  VCONST  command   for   more
  2033.                 information.
  2034. @end
  2035. @nf 44
  2036. @head centre,"The DISPLAYLN command"
  2037. @ban
  2038. @border
  2039.  
  2040.  PURPOSE        Displays  data on the video, and moves the cursor  to  the
  2041.                 first character position on the next line.
  2042.  
  2043.  $X$ DISPLAYLN standard_list_of_datatypes
  2044.  
  2045.  $Y$ A new-line can be displayed using:
  2046.  
  2047.                 DISPLAYLN 1             i.e. Display one space
  2048.  
  2049.  NOTE2          Output   from this command is channelled  through   MS-DOS
  2050.                 and  therefore it will be displayed in the MS-DOS  default
  2051.                 colour.
  2052.  
  2053.  NOTE3          The  system variable DISPLAY will contain the  contents of
  2054.                 the  line displayed.  This is very useful if you  want  to
  2055.                 save the displays to a file.
  2056. @end
  2057. @nf 45
  2058. @head centre,"The DRAW command"
  2059. @ban
  2060. @border
  2061.  
  2062.  PURPOSE        Draws   a   horizontal/vertical  line  or   rectangle   in
  2063.                 the prevailing foreground colour.  The drawing can be done
  2064.                 using either single-line or double-line graphics according
  2065.                 to  the currently selected line graphics mode.
  2066.  
  2067.  $X$ DRAW line-1 column-1 line-2 column-2
  2068.  
  2069.                 where :
  2070.  
  2071.                 (line-1,column-1)  and  (line-2,column-2)  are  pairs   of
  2072.                 integer  variables  or  constants that define  the   start
  2073.                 and  finish screen co-ordinates.
  2074.  
  2075.  $N$ Single/double  line mode should be selected  before  using
  2076.                 the   DRAW  command by using the  DISPLAY   command   (Not
  2077.                 DISPLAYLN)  to send the appropriate video  constants   (85
  2078.                 and 86).  Use FORE and BACK commands to control colour.
  2079. @end
  2080. @nf 46
  2081. $P$
  2082. @head centre,"The FORE command"
  2083. @ban
  2084. @border
  2085.  
  2086.  PURPOSE        FORE  command  sets the foreground  colour  only.   Please
  2087.                 refer  also  to  the section  on  the  complementary  BACK
  2088.                 command.
  2089.  
  2090.  $X$ FORE attribute
  2091. @win line5,column51,depth18,width22
  2092. @gon
  2093. 7----8---------------9
  2094. 0 0  0               0
  2095. 0 1  0               0
  2096. 0 2  0               0
  2097. 0 3  0               0
  2098. 0 4  0               0
  2099. 0 5  0               0
  2100. 0 6  0               0
  2101. 0 7  0               0
  2102. 0 8  0               0
  2103. 0 9  0               0
  2104. 0 10 0               0
  2105. 0 11 0               0
  2106. 0 12 0               0
  2107. 0 13 0               0
  2108. 0 14 0               0
  2109. 0 15 0               0
  2110. 1----2---------------3
  2111. @win line6,column58,depth1,width1
  2112. @dim
  2113.  Black
  2114. Blue
  2115. Green
  2116. Cyan
  2117. Red
  2118. Magenta
  2119. Brown
  2120. White
  2121. @bright
  2122.  Dark Grey
  2123. light Blue
  2124. light Green
  2125. light Cyan
  2126. light Red
  2127. light Magenta
  2128. Yellow
  2129. Bright white
  2130. @end
  2131.  
  2132. @nf 47
  2133. @head centre,"The LOCATE command"
  2134. @ban
  2135. @border
  2136.  
  2137.  PURPOSE        Used  to return the current position of the  cursor,  i.e.
  2138.                 line  and column as integers.  This may be required for  a
  2139.                 variety  of  purposes including keeping  track  of  MS-DOS
  2140.                 cursor movement.
  2141.  
  2142.  $X$ LOCATE line column
  2143.  
  2144.                 where line and column are integer variables.
  2145.  
  2146.  $Y$ The  values  returned may be used in a  subsequent  CURSOR
  2147.                 command.
  2148.  
  2149.  NOTE2          This  command  always  returns  the  correct  co-ordinates
  2150.                 irrespective  of  which component is driving  the  screen,
  2151.                 i.e. MS-DOS or the Taskmaster VT52 interface.
  2152. @end
  2153. @nf 48
  2154. @head centre,"The POPDOWN command"
  2155. @ban
  2156. @border
  2157.  
  2158.  PURPOSE        To  restore the contents of the screen as previous to  the
  2159.                 use of the POPUP command.  Does not return the memory used
  2160.                 by the POPUP command.
  2161.  
  2162.  $X$ POPDOWN identifier
  2163.  
  2164.  $Y$ The supplied identifier must contain a value returned by a
  2165.                 previous   POPUP  or POPGET command - it need not  be  the
  2166.                 same   integer  variable  but  its value must  conform  to
  2167.                 that of  a  valid identifier.
  2168.  
  2169.  NOTE2          If the identifier given corresponds to one obtained by the
  2170.                 POPGET  command  then the window will be restored  in  its
  2171.                 original position.
  2172.  
  2173.  NOTE3          POPDOWN  may  be used repeatedly for a  given  identifier.
  2174.                 Identifiers  remain  valid  until  a  POPFREE  command  is
  2175.                 executed referencing them.
  2176.  
  2177.  NOTE4          See the POPUP command for further details and examples.
  2178. @end
  2179.  
  2180. @nf 49
  2181. @head centre,"The POPFREE command"
  2182. @ban
  2183. @border
  2184.  
  2185.  PURPOSE        The   POPFREE command simply returns memory allocated to a
  2186.                 POPUP identifier back to the POPUP pool for re-use.
  2187.  
  2188.  $X$ POPFREE identifier
  2189.  
  2190.  $N$ Refer to the NOTES section of the POPUP command.
  2191. @end
  2192. @nf 4a
  2193. @head centre,"The POPGET command"
  2194. @ban
  2195. @border
  2196.  
  2197.  PURPOSE        The   function  of the POPGET command is to save  the area
  2198.                 defined in the last @window directive into the POPUP  pool
  2199.                 and  return  an identifier to it.  A PUT or  MENU  command
  2200.                 must  have been executed prior to this command referencing
  2201.                 a template containing a window.
  2202.  
  2203.  $X$ POPGET identifier
  2204.  
  2205.  $Y$ Once  the  POPGET  command has  sucessfully  executed  the
  2206.                 screen  area  can easily (and instantly)  be  restored  by
  2207.                 means of a POPUP command.
  2208.  NOTE2          It  is  customary to execute POPGET commands  during  task
  2209.                 initialisation.
  2210.  NOTE3          The location, colour and contents of the screen area  need
  2211.                 not be specified in POPUP commands referencing identifiers
  2212.                 obtained  with  POPGET as this information  is  implicitly
  2213.                 defined in the screen template.
  2214.  NOTE4          Users are advised to create frequently used popups  before
  2215.                 transient ones.  This minimises the chances of fragmenting
  2216.                 the popup memory pool.
  2217.  NOTE5          See STANDARD for examples of use
  2218. @end
  2219.  
  2220. @nf 4b
  2221. @head centre,"The POPUP command"
  2222. @ban
  2223. @border
  2224.  
  2225.  PURPOSE        To  'popup'  a  text window in  specified  foreground  and
  2226.                 background  colours at a desired screen  location,  saving
  2227.                 the current screen contents for a subsequent restore using
  2228.                 the POPDOWN command.
  2229.  
  2230.  $X$ POPUP identifier table_of_var foreground background
  2231.  SYNTAX2        POPUP id1 FROM id2
  2232.  
  2233.  $Y$ This  command  returns a response in the  first  parameter
  2234.                 identifier which must be an integer variable.  A  non-zero
  2235.                 value in the identifier indicates that a popup buffer  was
  2236.                 successfully  allocated.  A zero value indicates  that  no
  2237.                 memory  was  available.
  2238.  NOTE2          Current cursor position will be top left corner of popup.
  2239.  NOTE3          See FORE and BACK for values of foreground and  background
  2240.                 parameters.
  2241.  NOTE4          After executing this command, your task should  eventually
  2242.                 perform a POPFREE command.
  2243.  NOTE5          Variant 2 displays popup id2 after storing screen contents
  2244.                 and returning id1.
  2245. @end
  2246. @nf 4c
  2247. @head centre,"The SCANVID command"
  2248. @ban
  2249. @border
  2250.  
  2251.  PURPOSE        To extract data from screen memory.  The screen may be any
  2252.                 valid  screen,  i.e.  the  current  active  screen  or  an
  2253.                 inactive  screen.   The command extracts the data  from  a
  2254.                 nominated line number.
  2255.  
  2256.  $X$ SCANVID line-number GIVING variable
  2257.  
  2258.  $Y$ The SCANVID  command  reads  n  characters  starting  from 
  2259.                 column 0 of a specified line. The number of  characters  n 
  2260.                 is determined by the current size of the receiving var.
  2261.  NOTE2          Only the ASCII values of screen  locations  are  returned, 
  2262.                 i.e. attributes are not returned.
  2263.  NOTE3          You  may  use the SCAN command on the  receiving  datatype
  2264.                 without issuing a preparatory SETSCAN command.
  2265.  
  2266.  $V$ To read lines 2 to 11:
  2267.                 var video,2000
  2268.                 sizevar video 800
  2269.                 scanvid 2 giving video
  2270. @end
  2271. @nf 4d
  2272. @head centre,"The SCREEN command"
  2273. @ban
  2274. @border
  2275.  
  2276.  PURPOSE        Changes  the  current  display page  of  the  video.   All
  2277.                 subsequent  VT52  video commands will  have  their  output
  2278.                 directed  to the selected page.  The number  of  available
  2279.                 display  pages  depends  upon the type  of  video  adaptor
  2280.                 fitted.
  2281.  
  2282.  $X$ SCREEN page-number
  2283.  
  2284.  $Y$ The  page-number given is not checked as being the  number
  2285.                 of a physically available display page and only pages  0-3
  2286.                 will be allowed in any event.
  2287.  NOTE2          The command does not affect the active page, i.e. the page
  2288.                 currently displayed.
  2289.  NOTE3          This  command is normally used to enable the  contents  of
  2290.                 additional  screens to be built-up transparently and  then
  2291.                 to display them using the SWITCH command.
  2292. @end
  2293. @nf 4e
  2294. @head centre,"The SWITCH command"
  2295. @ban
  2296. @border
  2297.  
  2298.  PURPOSE        Changes  the currently active display page of  the  video.
  2299.                 This causes the selected page to be displayed.
  2300.  
  2301.  $X$ SWITCH page-number
  2302.  
  2303.  $Y$ The  page-number given is not checked as being the  number
  2304.                 of a physically available display page and only pages  0-3
  2305.                 will be allowed in any event.
  2306.  
  2307.  NOTE2          Refer  to the example given for the SCREEN command to  see
  2308.                 how the SWITCH command may be used.
  2309.  
  2310.  NOTE3          The  number  of available display pages depends  upon  the
  2311.                 type of video adaptor fitted.
  2312.  
  2313.  NOTE4          The POPSCREEN  command may be used in lieu of  SCREEN  and
  2314.                 SWITCH commands especially on mono videos with  one  page.
  2315.                 See the OVERVIEW and STANDARD tasks for examples of use.
  2316. @end
  2317. @nf 4f
  2318. @head centre,"The USERLINE command"
  2319. @ban
  2320. @border
  2321.  
  2322.  PURPOSE        FmP PROTEAN  based  products  make extensive use  of   the
  2323.                 video  USERLINE   (line  25 of the  screen).   Many  user-
  2324.                 written  Taskmaster applications also wish  to  make   use
  2325.                 of this facility.
  2326.  
  2327.                 The  command  allows  you to easily display  data  on  the
  2328.                 userline,  independendent  of the rest of the  screen  and
  2329.                 retaining the cursor position.
  2330.  
  2331.  $X$ USERLINE standard_list_of_datatypes
  2332.  
  2333.  $Y$ The   USERLINE  command  ensures that the  length  of  the
  2334.                 displayed data is 80 characters or less.
  2335.  
  2336.  NOTE2          Userline output assumes the current screen attributes  set
  2337.                 by  any  previous commands that used the  VT52  interface,
  2338.                 i.e. colour, intensity, flashing etc.
  2339.  
  2340.  NOTE3          See the SCR @USERLINE directive.
  2341. @end
  2342. @nf m5
  2343. @head left,"External program control"
  2344. $P$
  2345. @head centre,"Menu"
  2346. @ban
  2347. @border
  2348.  
  2349. @bbmenu white,red
  2350.   {BEHAVE   }
  2351.   {LARGE    }
  2352.   {RUN      }
  2353. @col char,white,blue
  2354.  
  2355.  (See also the DATA command on the Operating Environment menu)
  2356. @col char,white,red
  2357. @win line2,column14,depth3,width60
  2358. Selects I/O environment
  2359. Runs large applications (Taskmaster shrinks to 1k)
  2360. Invoke MS-DOS programs
  2361. $A$
  2362. @end
  2363.  
  2364. @nf 51
  2365. @head centre,"The BEHAVE command"
  2366. @ban
  2367. @border
  2368.  
  2369.  PURPOSE        Applications   programs  are  classified  as  having   the
  2370.                 following types of behaviour:
  2371.                 TYPE1     Well   behaved,   i.e.  uses   standard   MS-DOS
  2372.                           functions  to  obtain keyboard input  and  hence
  2373.                           permits   the  use  of   standard   re-direction
  2374.                           facilities.
  2375.                 TYPE2     Ill behaved, i.e. uses the ROM BIOS interrupt 16
  2376.                           to obtain keyboard data.
  2377.  
  2378.  $X$ BEHAVE CLASS {{wait NACKS}}
  2379.                 where CLASS is an integer value 0, 1, 2 or 3.
  2380.  $Y$ The  wait clause is only available for class 2.  If  used,
  2381.                 the next program will be told there is no data   available
  2382.                 the first 'NACKS' times it checks keyboard status.
  2383.  NOTE2          BEHAVE 1 and 2 create a file called REDIRECT.PRO.  This is
  2384.                 used to store data in subsequent DATA commands.
  2385.  NOTE3          BEHAVE 0  has the effect of  cancelling any  data  stored.
  2386.                 If it follows  behave 1 or 2;  REDIRECT.PRO is  closed and
  2387.                 may be used for other purposes.
  2388.  NOTE4          BEHAVE 3 is like BEHAVE 1 except you may nominate  a  file
  2389.                 name as a parameter.  See PRINTMAN.TSK.
  2390. @end
  2391. @nf 52
  2392. @head centre,"The LARGE command"
  2393. @ban
  2394. @border
  2395.  
  2396.  PURPOSE        Enables large MS-DOS programs to be executed.  The command
  2397.                 is otherwise identical to the RUN command and should  only
  2398.                 be  employed  when  difficulty in  loading  a  program  is
  2399.                 experienced due to lack of available memory.
  2400.  
  2401.  $X$ LARGE list-of-datatypes
  2402.  
  2403.  $Y$ The command operates by causing areas of code and data  to
  2404.                 be  paged-out  of  memory leaving a  nominal  2K  of  code
  2405.                 behind.   This  enables virtually any program  to  be  run
  2406.                 beneath Taskmaster.
  2407.  NOTE2          The  message  "Large  program loading..  please  wait"  is
  2408.                 displayed when the LARGE command executes.
  2409.  NOTE3          Paged-out   memory  is written to a temporary   swap  file
  2410.                 called C:\TMnnnnn.OVL where nnnnn is a unique number.   If
  2411.                 drive C does not exist, or you would prefer the file to be
  2412.                 created  somewhere  other  than the  root  directory,  you
  2413.                 should  define  this  by  adding  the  following  line  to
  2414.                 AUTOEXEC.BAT: SET TMP=PATH
  2415.  
  2416.                 E.g. SET TMP=A:\WORKDIR
  2417. @end
  2418. @nf 53
  2419. @head centre,"The RUN command"
  2420. @ban
  2421. @border
  2422.  
  2423.  PURPOSE        Invokes an MS-DOS command, program or batch file.
  2424.  
  2425.  $X$ RUN standard_list_of_datatypes
  2426.  
  2427.  $Y$ Uses  COMMAND.COM (or if the Environment Variable  COMSPEC
  2428.                 is set it uses the command processor defined therein).  If
  2429.                 it  fails  to  load this  utility a message may be  output
  2430.                 and RESP indicates the reason.  See system variable RESP.
  2431.  
  2432.  NOTE2          The  MS-DOS ERRORLEVEL parameter value is returned in  the  
  2433.                 integer variable ELEVEL.
  2434.  
  2435.  NOTE3          See the LARGE command if you experience difficulty loading
  2436.                 large applications.
  2437.  
  2438.  NOTE4          If you would like to pass data to the application after it
  2439.                 has been loaded see the BEHAVE and DATA commands.
  2440.  
  2441.  NOTE5          Command line parameters and flags may be supplied as  well  
  2442.                 as the name of the application.
  2443. @end
  2444. @nf m6
  2445. @head left,"EUC interface commands"
  2446. $P$
  2447. @head centre,"Menu"
  2448. @ban
  2449. @border
  2450.  
  2451. @bbmenu white,red
  2452.   {CATALOG  }
  2453.   {LOGIN    }
  2454.   {LOGOUT   }
  2455.   {PASSWORD }
  2456. @col char,white,red
  2457. @win line2,column14,depth4,width60
  2458. Opens the EUC Catalogue
  2459. VALIDATE EUC username and password
  2460. EUC catalogue exit
  2461. EUC edit password in catalogue
  2462. $A$
  2463. @end
  2464.  
  2465. @nf 61
  2466. @head centre,"The CATALOG command"
  2467. @ban
  2468. @border
  2469.  
  2470.  PURPOSE        The CATALOG command opens a catalogue containing a list of
  2471.                 current   authorised   users  in  order   to   allow   the
  2472.                 verification of passwords when a user "logs in".  You  are
  2473.                 responsible for processing login requests in your task  by
  2474.                 invoking the LOGIN command.
  2475.  
  2476.                 End-users  may  NOT create usernames but they  can  change
  2477.                 their  password provided you have chosen to  support  this
  2478.                 facility in the task by using the PASSWORD command.
  2479.  
  2480.  $X$ CATALOG drive-letter
  2481.  
  2482.                 where drive-letter is in the range A-P and may be any of :
  2483.  
  2484.                 a string, e.g.  F:\DEV
  2485.                 a literal,e.g.  "B:\PROGS"
  2486.                 a variable
  2487. @end
  2488. @nf 62
  2489. @head centre,"The LOGIN command"
  2490. @ban
  2491. @border
  2492.  
  2493.  PURPOSE        If  the  login  is successful,  the  date/time  and  other
  2494.                 details are recorded in the catalogue.
  2495.  
  2496.                 The  login remains in force until either a LOGOUT or  STOP
  2497.                 command is obeyed.
  2498.  
  2499.  $X$ LOGIN     user_name password user_group
  2500.  
  2501.                 where user_name and password  are variables and user_group
  2502.                 is an integer variable (to return a value).
  2503.  
  2504.  $Y$ The  catalogue must be open when this command  is  issued.
  2505.                 See the CATALOG command.
  2506.  
  2507.  NOTE2          The  user_name  and  password must  be  variables  with  a
  2508.                 maximum current size of 16 characters.
  2509.  
  2510.  NOTE3          If  the user_name does not exist, the system integer  RESP
  2511.                 will return the value 1.  If the user_name exists but  the
  2512.                 password is invalid, RESP will return the value 2.
  2513. @end
  2514. @nf 63
  2515. @head centre,"The LOGOUT command"
  2516. @ban
  2517. @border
  2518.  
  2519.  PURPOSE        The  LOGOUT command should be invoked whenever a user  has
  2520.                 finished  using the TASKMASTER system.  The date and  time
  2521.                 logged off are recorded in the catalogue.
  2522.  
  2523.  $X$ LOGOUT
  2524.  
  2525.  $N$ A  user  must  be "logged-out" before a new  user  can  be
  2526.                 "logged-in" using the LOGIN command.
  2527. @end
  2528. @nf 64
  2529. @head centre,"The PASSWORD command"
  2530. @ban
  2531. @border
  2532.  
  2533.  PURPOSE        Allows   a  "logged-in"  user  to  change  their   current
  2534.                 password.
  2535.  
  2536.  $X$ PASSWORD  new_password
  2537.                 where new_password is a variable
  2538.  
  2539.  $Y$ The current size of the variable must not be greater  than
  2540.                 16 characters.
  2541.  NOTE2          Any characters may be used and lower case alphabetics will
  2542.                 not be converted to upper case.
  2543.  NOTE3          This command may only be issued if :
  2544.                 a)   A CATALOG command has been issued previously.
  2545.                 b)   A valid LOGIN has been performed.
  2546.  NOTE4          The  EUC utility also allows passwords to be  assigned  or
  2547.                 changed by the authorised system administrator.
  2548.  
  2549.                 Normally,  an initial password would be assigned when  the
  2550.                 user_name is first introduced into the catalogue using the
  2551.                 EUC utility.
  2552. @end
  2553. @nf m7
  2554. $P$
  2555. @head left,"Data definition commands"
  2556. @head centre,"Menu"
  2557. @ban
  2558. @border
  2559.  
  2560. @bbmenu white,red
  2561.   {DEFINE   }
  2562.   {END      }
  2563.   {HEXVAR   }
  2564.   {INT      }
  2565.   {LOGICAL  }
  2566.   {VAR      }
  2567.   {VCONST   }
  2568. @col char,white,red
  2569. @win line2,column14,depth7,width60
  2570. Defines/initialises an integer
  2571. End of data declarations
  2572. Hexadecimal variable - VAR with value specified in HEX
  2573. Integer variable - can be 0-65535
  2574. Logical variable - can be TRUE or FALSE
  2575. A byte variable - may also be used for tables
  2576. A video constant - portable video function
  2577. $A$
  2578. @end
  2579.  
  2580.  
  2581. @nf 71
  2582. @head centre,"The DEFINE command"
  2583. @ban
  2584. @border
  2585.  
  2586.  PURPOSE        Defines frequently  used constants that may be referred to
  2587.                 by name.   Use it to define error codes, responses etc.
  2588.  
  2589.  $X$ DEFINE name,integer_constant
  2590.  
  2591.  $Y$ An  integer-constant if specified must be in the  range 0-
  2592.                 65535.
  2593.  
  2594.  NOTE2          The variable so defined may be used in any context that an
  2595.                 integer variable could be used.
  2596.  
  2597.  NOTE3          No   check is made to prevent you from assigning   a   new
  2598.                 value  to the name, but this is not recommended -  use  an
  2599.                 integer variable instead.
  2600. @end
  2601. @nf 72
  2602. @head centre,"The END command"
  2603. @ban
  2604. @border
  2605.  
  2606.  PURPOSE        Defines the end of data declarations.
  2607.  
  2608.  $X$ END
  2609. @end
  2610. @nf 73
  2611. @head centre,"The HEXVAR command"
  2612. @ban
  2613. @border
  2614.  
  2615.  PURPOSE        Declares  a  variable  by  specifying  it  as  hexadecimal
  2616.                 characters.
  2617.  
  2618.  $X$ HEXVAR name-of-variable, hexadecimal string
  2619.  
  2620.  $Y$ A   hexadecimal  string  is  defined  as  a   string    of
  2621.                 hexadecimal digits in the range 0-9, A-F.
  2622.  
  2623.                 Hex digits should be specified in pairs.   Each pair  will
  2624.                 be  converted  and  held  as  a  character   within    the
  2625.                 variable.
  2626.  
  2627.  NOTE2          Hexadecimal  variables may be used in any context where an
  2628.                 ordinary variable might be used.
  2629.  
  2630.  NOTE3          Hexadecimal   variables  are  not  to  be  confused   with
  2631.                 hexadecimal constants which are integers.
  2632. @end
  2633. @nf 74
  2634. @head centre,"The INT command"
  2635. @ban
  2636. @border
  2637.  
  2638.  PURPOSE        Declares  one or more int-vars.   An  int-var is  a  user-
  2639.                 defined area of  available  memory which  may  be used  to
  2640.                 hold a  signed  integer value in the range -32768 to 32767
  2641.                 inclusive OR an unsigned value in the range 0 to 65535.
  2642.  
  2643.  $X$ INT variable_name{{,variable_name ...}}
  2644.  
  2645.  $N$ The  initial value of declared variables is ZERO.  If  you
  2646.                 wish  to  assign  an alternative initial  value,  use  the
  2647.                 DEFINE command.
  2648.  
  2649. @end
  2650. @nf 75
  2651. @head centre,"The LOGICAL command"
  2652. @ban
  2653. @border
  2654.  
  2655.  PURPOSE        Declares  one  or  more logical  variables.    A   logical
  2656.                 variable   is a user-defined area of memory which  may  be
  2657.                 assigned the values TRUE or FALSE.
  2658.  
  2659.  $X$ LOGICAL name{{,name ...}}
  2660.  
  2661.  $Y$ The initial value of declared variables is FALSE.
  2662.  
  2663.  NOTE2          Logical   variables   should be used wherever   they  will
  2664.                 improve the readability of the task.
  2665.  
  2666.  NOTE3          Logical  variables may also be used for  remembering   the
  2667.                 previous state of a logical system variable.
  2668.  
  2669.                 For  example, if you have used a FIND command  which  sets
  2670.                 the  system variable FOUND to either TRUE or  FALSE,   and
  2671.                 you   wish  to  perform a further FIND   command   without
  2672.                 losing  the result of the first FIND,   you can  save  the
  2673.                 value   of  FOUND in a logical variable which   you   have
  2674.                 declared.
  2675. @end
  2676. @nf 76
  2677. @head centre,"The VAR command"
  2678. @ban
  2679. @border
  2680.  
  2681.  PURPOSE        Declares  a  user-defined  area of  available  memory   to
  2682.                 contain a string of bytes or a table of strings.
  2683.  
  2684.  $X$ VAR NAME,size {{,optional_literal_value}}
  2685.                              {{,OCCURS n}}
  2686.                              {{,OCCURS n}}{{,optional_literal_value}}
  2687.  
  2688.                 Using  this syntax the size of the literal is  limited  by
  2689.                 the allowable length  for a command (160 characters).  The
  2690.                 alternative syntax:
  2691.  
  2692.  SYNTAX2        VAR name,size {{,OCCURS n }} {{,
  2693.                 literal
  2694.                 literal
  2695.                 literal
  2696.                 ....}}
  2697.  
  2698.                 enables more data to be assigned if required.
  2699. @end
  2700. @nf 77
  2701. @head centre,"The VCONST command"
  2702. @ban
  2703. @border
  2704.  
  2705.  PURPOSE        Declares a video constant.  You may  need  to  use   video
  2706.                 control sequences  which are already known to  Taskmaster.
  2707.                 An example is the CLEAR SCREEN function.
  2708.  
  2709.  $X$ VCONST sequence_name,number_in_sequence_table
  2710.  
  2711.  $Z$
  2712. @gon
  2713.      VCONST    variables   are  read  in   7----8--------------------------9
  2714.      from   the   FmP   supplied    file   0 11 0 Clear-screen             0
  2715.      FMPVT52.DEF.                          0 46 0 set STEADY attribute     0
  2716.                                            0 47 0 set FLASHING attribute   0
  2717.      The  MOVE  command  allows   VCONST   0 48 0 Exit reverse video mode  0
  2718.      variables on the left hand side  of   0 55 0 Clear to end of line     0
  2719.      the expression.                       0 56 0 Clear to end of screen   0
  2720.                                            0 74 0 Enable cursor            0
  2721.      VCONST variables can be used in any   0 75 0 Disable cursor           0
  2722.      command where a standard_list_of      0 78 0 Enter reverse video mode 0
  2723.      _datatypes is permitted.              0 85 0 Select Single graphics   0
  2724.                                            0 86 0 Select Double graphics   0
  2725.                                            1----2--------------------------3
  2726. @end
  2727. @nf m8
  2728. @head left,"Data initialisation commands"
  2729. $P$
  2730. @head centre,"Menu"
  2731. @ban
  2732. @border
  2733.  
  2734. @bbmenu white,red
  2735.   {CLEAR    }
  2736.   {SIZEVAR  }
  2737. @col char,white,red
  2738. @win line2,column14,depth2,width60
  2739. Reset one or more VARs to spaces, INTs to 0 etc.
  2740. Specify new effective size of VAR
  2741. $A$
  2742. @end
  2743. @nf 81
  2744. @head centre,"The CLEAR command"
  2745. @ban
  2746. @border
  2747.  
  2748.  PURPOSE        Initialises a list of datatypes.   This command is  ALWAYS
  2749.                 faster in execution than its equivalent MOVE command.
  2750.  
  2751.                 Because  a list of datatypes can be supplied,  this  leads
  2752.                 to more efficient tasks, i.e.  one CLEAR can be equivalent
  2753.                 to  a list of MOVE commands.
  2754.  
  2755.  $X$ CLEAR list_of_datatypes
  2756.  
  2757.  $N$ Allowable datatypes and the effect of this command on them
  2758.                 are as follows:
  2759. @gon
  2760.                 7---------------------------8-------------------9
  2761.                 0    Datatype               0 Cleared to        0
  2762.                 4---------------------------5-------------------6
  2763.                 0     INT var               0   0               0
  2764.                 0     LOGICAL               0   FALSE           0
  2765.                 0     VAR                   0   spaces          0
  2766.                 0     table of VAR          0   spaces          0
  2767.                 1---------------------------2-------------------3
  2768.  
  2769.                 Variables are reset to their declared (maximum) size.
  2770. @end
  2771. @nf 82
  2772. @head centre,"The SIZEVAR command"
  2773. @ban
  2774. @border
  2775.  
  2776.  PURPOSE        Sets  or alters the current size of a var.  The size of  a
  2777.                 var  can  be anywhere between zero (a NULL  variable)  and
  2778.                 the declared (maximum) size.
  2779.  
  2780.  $X$ SIZEVAR VAR INT
  2781.  
  2782. @draw
  2783.  $Z$                        >1<
  2784.      Remember that variables have a      var filename,10,"FRED.DAT"
  2785.      declared  (maximum)  size  and      sizevar filename 4
  2786.      current size.  By default  the      displayln filename
  2787.      current size is zero (and  the      sizevar filename 6
  2788.      variable   contains    spaces)      displayln filename
  2789.      unless data has been  assigned                                   >1<
  2790.      to   the   variable   in   its
  2791.      definition.                       >2<
  2792.                                          FRED
  2793.      The  use  of  sizevar  doesn't      FRED.D
  2794.      affect   the  contents  of   a                                   >2<
  2795.      variable.
  2796. @end
  2797. @nf m9
  2798. @head left,"Task flow control commands"
  2799. $P$
  2800. @head centre,"Menu"
  2801. @ban
  2802. @border
  2803.  
  2804. @bbmenu white,red
  2805.   {ELSE     }
  2806.   {ENDTASK  }
  2807.   {FI       }
  2808.   {GOTO     }
  2809.   {IF       }
  2810.   {STOP     }
  2811.   {WAIT     }
  2812.   {WHILE    }
  2813.   {UNTIL    }
  2814. @col char,white,red
  2815. @win line2,column14,depth9,width60
  2816. Used in IF - ELSE - FI construction
  2817. End of task declaration - cease interpretation
  2818. Terminates ELSE, IF, WHILE or UNTIL CODE-BLOCK
  2819. Jump to label
  2820. Evaluate expression - if FALSE skip to ELSE or FI
  2821. Task termination - return to Operating System
  2822. Display a message and Wait for a key depression
  2823. Evaluate expression in loop - when FALSE skip to FI
  2824. Evaluate expression in loop - when TRUE skip to FI
  2825. $A$
  2826. @end
  2827.  
  2828. @nf 91
  2829. @head centre,"The ELSE command"
  2830. @ban
  2831. @border
  2832.  
  2833.  PURPOSE        Causes  an alternative {{CODE-BLOCK}} to be  obeyed,  when
  2834.                 the result of an IF command evaluates to FALSE.
  2835.  
  2836.  NOTE1          The   {{CODE_BLOCK}} following  ELSE must  be   terminated
  2837.                 by a FI command.
  2838.  NOTE2          Further  {{CODE_BLOCK}}s  may be nested  within  the  ELSE
  2839.                 {{CODE_BLOCK}}.
  2840.  NOTE3          The   ELSE   command  may  only  be  used   to   terminate
  2841.                 {{CODE_BLOCK}}s prefixed by the IF command.
  2842.  
  2843.  $V$ IF NAME CONTAINS "SMITH"
  2844.                   INCREMENT SMITHS
  2845.                   IF SMITHS > 100
  2846.                     DISPLAYLN "Too many SMITHS"
  2847.                   ELSE
  2848.                     DISPLAYLN SMITHS " SMITHS found"
  2849.                   FI
  2850.                 ELSE
  2851.                   INCREMENT OTHER_NAMES
  2852.                 FI
  2853. @end
  2854. @nf 92
  2855. @head centre,"The ENDTASK command"
  2856. @ban
  2857. @border
  2858.  
  2859.  PURPOSE        ENDTASK should be the last command in a task.
  2860.  
  2861.  $X$ ENDTASK
  2862.  
  2863.  $N$ Scr  source data relating to the task may  optionally   be
  2864.                 placed at the end of the task,  i.e.  the .TSK file.  This
  2865.                 is  possible because Scr,  the screen  processing  program
  2866.                 ignores all data preceding the @VIDEO directive.
  2867.  
  2868.                 It   is  wise  to include the ENDTASK  command   so   that
  2869.                 Taskmaster cannot accidentally attempt to  interpret   SCR
  2870.                 commands as Taskmaster commands.
  2871. @end
  2872. @nf 93
  2873. @head centre,"The FI command"
  2874. @ban
  2875. @border
  2876.  
  2877.  PURPOSE        Terminates  a  {{CODE-BLOCK}} which follows  any   of  the
  2878.                 following commands:
  2879.  
  2880.                 IF  ELSE  UNTIL  WHILE
  2881.  
  2882.  $X$ FI {{integer_variable}}
  2883.  
  2884.  $Y$ Within  a  task,  there MUST be a matching FI command  for
  2885.                 each IF, UNTIL and WHILE command.
  2886.  
  2887.  NOTE2          For   ease of readability,  it is normal to indent  FI  to
  2888.                 the   same  extent as its matching IF,  UNTIL   or   WHILE
  2889.                 command.    This approach is also likely to  minimise  the
  2890.                 risk   of producing a block structure   with  unterminated
  2891.                 blocks.
  2892.  
  2893.  NOTE3          If you wish to increment a counter at the end of an  UNTIL
  2894.                 or  WHILE {{CODE-BLOCK}}, this may be  achieved  by   naming
  2895.                 the  integer  variable as a parameter to the  matching  FI
  2896.                 command.
  2897. @end
  2898. @nf 94
  2899. @head centre,"The GOTO/GOBACK commands"
  2900. @ban
  2901. @border
  2902.  
  2903.  PURPOSE        Forces a jump to a label.
  2904.  
  2905.  $X$ GOTO string {{,variable}}
  2906.  SYNTAX2        GOTO variable
  2907.  SYNTAX3        GOTO string
  2908.  
  2909.  $Y$ The   location jumped to must be a label at  the   current
  2910.                 block level.
  2911.  
  2912.  NOTE2          Labels  must  be  UPPERCASE and start with  a  numeric  in
  2913.                 column 0.
  2914.  
  2915.  NOTE3          The GOTO command searches forward from current position in
  2916.                 the  source  to  end  of file and  then  starts  from  the
  2917.                 beginning again giving up when it reaches the GOTO command
  2918.                 line.  You may use GOBACK for improved performance if  you
  2919.                 know the label precedes the command.  GOBACK always starts
  2920.                 searching from the beginning of the file.
  2921. @end
  2922. @nf 95
  2923. @head centre,"The IF command"
  2924. @ban
  2925. @border
  2926.  
  2927.  PURPOSE        Evaluates an expression to either TRUE or FALSE.  If TRUE,
  2928.                 the following {{CODE-BLOCK}} is performed.  If  FALSE,   all
  2929.                 commands upto the next ELSE or FI command are ignored.
  2930.  
  2931.  $X$ IF expression {{AND/OR expression ...}}
  2932.                  {{CODE-BLOCK}}
  2933.                 FI
  2934.  
  2935.  SYNTAX2        IF expression {{ AND/OR expression ...}}
  2936.                  {{CODE-BLOCK-1}}
  2937.                 ELSE
  2938.                  {{CODE-BLOCK-2}}
  2939.                 FI
  2940.  $Y$ Note that {{CODE-BLOCK-1}} can be an empty block.   This  is
  2941.                 an often used technique to reverse a condition.
  2942.  
  2943.  NOTE2          Syntax for expression is covered at length in the  printed
  2944.                 manual.
  2945. @end
  2946. @nf 96
  2947. @head centre,"The STOP command"
  2948. @ban
  2949. @border
  2950.  
  2951.  PURPOSE        Closes   all files and relinquishes all  resources  before
  2952.                 returning to the calling process.
  2953.  
  2954.  $X$ STOP {{n}}
  2955.  
  2956.                 where n is an integer in the range 1-255 used to return an
  2957.                 ERRORLEVEL parameter when invoked from a shell.
  2958. @end
  2959. @nf 97
  2960. @head centre,"The WAIT command"
  2961. @ban
  2962. @border
  2963.  
  2964.  PURPOSE        Suspends  execution of a task for a pre-determined  period
  2965.                 or until a key is pressed.
  2966.  
  2967.  $X$ WAIT {{literal or var}}
  2968.  SYNTAX2        WAIT int-constant or int-var
  2969.  
  2970.  $Y$ If  no datatype is specified following  WAIT,   Taskmaster
  2971.                 will output the message:
  2972.                     "Waiting - press any key to continue"
  2973.  
  2974.                 and  wait indefinitely until the user presses a  key.   If
  2975.                 WAIT  is  followed  by  a literal or variable,  this  will
  2976.                 be displayed instead of the default message.
  2977.  
  2978.  NOTE2          If   WAIT  is followed by an integer, its  value  will  be
  2979.                 taken as the number of delay periods to wait, after  which
  2980.                 the task will resume at the next command.   In this  case,
  2981.                 the  value must be in the range 1-1000.  See DELAY.
  2982.  
  2983.  NOTE3          The  key pressed causing a breaking is made  available  in
  2984.                 KEYVAL system variable,  when KEY is also set.
  2985. @end
  2986. @nf 98
  2987. @head centre,"The WHILE command"
  2988. @ban
  2989. @border
  2990.  
  2991.  PURPOSE        Repeatedly  executes  a {{CODE-BLOCK}} while  a  condition
  2992.                 evaluates to TRUE.
  2993.  
  2994.  $X$ See the IF command.
  2995.  
  2996.  $Y$ The condition is always examined at the start of the loop.
  2997.  
  2998.  NOTE2          There   must be a matching FI command at the end  of   the
  2999.                 {{CODE-BLOCK}} being repeated.
  3000. @end
  3001. @nf 99
  3002. @head centre,"The UNTIL command"
  3003. @ban
  3004. @border
  3005.  
  3006.  PURPOSE        Repeatedly  executes  a  {{CODE_BLOCK}}  until  a  condition
  3007.                 evaluates to TRUE.
  3008.  
  3009.  $X$ See the IF command.
  3010.  
  3011.  $Y$ The   UNTIL   command  must be  followed   by   a   {{CODE-
  3012.                 BLOCK}}  terminated by a FI command.
  3013.  
  3014.  NOTE2          Other  UNTIL commands may be embedded within  the   {{CODE-
  3015.                 block}}.
  3016.  
  3017.  NOTE3          The   command is intended for creating  efficient   block-
  3018.                 structured code in preference to using the GOTO command.
  3019.  
  3020.  NOTE4          Loop  count  incrementation for the UNTIL command  can  be
  3021.                 handled  by  the optional parameter to  the  matching  FI.
  3022. @end
  3023. @nf ma
  3024. $P$
  3025. @head left,"Operating Environment commands"
  3026. @head centre,"Menu"
  3027. @ban
  3028. @border
  3029.  
  3030. @bbmenu white,red
  3031.   {COMPAT   }
  3032.   {DATA     }
  3033.   {DISABLE  }
  3034.   {ENABLE   }
  3035.   {PRINTER  }
  3036.   {SELECT   }
  3037.   {STRATEGY }
  3038. @col char,white,red
  3039. @win line2,column14,depth7,width60
  3040. MS-DOS facilities reporting
  3041. Passing data to programs
  3042. Environment control
  3043. Environment control
  3044. Gets the status of a printer
  3045. Selects the default drive
  3046. Controls memory allocation
  3047. $A$
  3048. @end
  3049.  
  3050. @nf a1
  3051. @head centre,"The COMPAT command"
  3052. @ban
  3053. @border
  3054.  
  3055.  PURPOSE        Informs  Taskmaster about the compatibility level  of  the
  3056.                 machine with respect to the IBM PC family.
  3057.  
  3058.  $X$ COMPAT flags
  3059.  
  3060.                 where  flags is an integer constant or variable  which  is
  3061.                 regarded as a 16-bit data area where bit significance is:
  3062.  
  3063.                 Bit  Default   Use
  3064.                 0    on        Set  if  machine has an IBM ROM  BIOS  data
  3065.                                area located at address 0000:0400h.
  3066.                 1    on        Set  if machine has an IBM  compatible  ROM
  3067.                                BIOS.
  3068.                 2    on        Set if  Taskmaster is required to run under
  3069.                                WINDOWS.
  3070.                 3    off       Set if required to run Taskmaster under PC-
  3071.                                MODE in a CDOS regime.
  3072.                 4-15  off      reserved
  3073.  
  3074.                 The default value is 7.
  3075. @end
  3076. @nf a2
  3077. @head centre,"The DATA command"
  3078. @ban
  3079. @border
  3080.  
  3081.  PURPOSE        To   supply data to the next program loaded and  run   via
  3082.                 the RUN (or LARGE) command.   This command emulates  input
  3083.                 from the keyboard.
  3084.  
  3085.  $X$ DATA standard_list_of_datatypes
  3086.  
  3087.  $Y$ The   amount  of data which may be supplied   in   advance
  3088.                 may  be  upto  512 bytes or  unlimited  depending  on  the
  3089.                 current setting of the BEHAVE command.
  3090.  NOTE2          STRINGS are allowed in the list_of_datatypes which must be
  3091.                 space separated.
  3092.  NOTE3          Note  that not all programs allow data to be  available in
  3093.                 advance.
  3094.  NOTE4          The method for passing data to programs is proprietary and
  3095.                 compatible with all machines having an IBM compatible  ROM
  3096.                 BIOS.
  3097.  NOTE5          You can use a notation ^X to denote CTRL/X where X is  the
  3098.                 required  control code.  You can, of course, use a  HEXVAR
  3099.                 to achieve the same result.
  3100. @end
  3101. @nf a3
  3102. @head centre,"The DISABLE command"
  3103. @ban
  3104. @border
  3105.  
  3106.  PURPOSE        This  command  is especially useful if you want to  create
  3107.                 a  very  secure  environment  which prevents   "end-users"
  3108.                 from  escaping  to the system, i.e. to the  MS-DOS  prompt
  3109.                 other than by the method you have dictated.
  3110.  
  3111.  $X$ DISABLE CTRL_C
  3112.  SYNTAX2        DISABLE SHELLING
  3113.  
  3114.  $Y$ By default CTRL_C is disabled and SHELLING is enabled.
  3115.  
  3116.  NOTE2          CTRL_C relates to the Operating System   feature   whereby
  3117.                 you   can prematurely breakin to Taskmaster  by   pressing
  3118.                 CTRL/C or CTRL/break and return to the MS-DOS prompt. This
  3119.                 prevents the end-user from interrupting task execution.
  3120.  
  3121.  NOTE3          SHELLING relates to the ability of  programs  RUN  beneath
  3122.                 Taskmaster to load further applications.
  3123.  
  3124.  IMPORTANT      CTRL/C  is always enabled when another program  is  loaded
  3125.                 from   Taskmaster  to allow "normal" operation   of   such
  3126.                 programs.
  3127. @end
  3128. @nf a4
  3129. @head centre,"The ENABLE command"
  3130. @ban
  3131. @border
  3132.  
  3133.  PURPOSE        CTRL_C enables (allows) users to  break-in  to  Taskmaster
  3134.                 using  CTRL/C.    SHELLING   allows  programs  loaded   by
  3135.                 Taskmaster to load further programs.  See DISABLE.
  3136.  
  3137.  $X$ ENABLE CTRL_C
  3138.  SYNTAX2        ENABLE SHELLING
  3139.  
  3140.  $N$ By default the CTRL_C feature is disabled and the SHELLING
  3141.                 feature is enabled.
  3142. @end
  3143. @nf a5
  3144. @head centre,"The PRINTER command"
  3145. @ban
  3146. @border
  3147.  
  3148.  PURPOSE        To  determine the current status of one of the  serial  or
  3149.                 parallel printers before use.
  3150.  
  3151.  $X$ PRINTER  name
  3152.  
  3153.                 where name is one of the parallel printer mnemnonics
  3154.                  LPT1, LPT2  or LPT3
  3155.  
  3156.                 or serial port mnemonics
  3157.                  COM1, COM2
  3158.  
  3159.                 or the defaults
  3160.                  PRN and AUX
  3161.  
  3162.  $N$ On completion of this command, the system  integer
  3163.                 variable RESP will contain either :
  3164.  
  3165.                     0         device available
  3166.                 or  255       device unavailable.
  3167. @end
  3168. @nf a6
  3169. @head centre,"The SELECT command"
  3170. @ban
  3171. @border
  3172.  
  3173.  PURPOSE        This command enables you to nominate the default drive.
  3174.  
  3175.  $X$ SELECT drive
  3176.  
  3177.                 where  drive  is  a letter in the range  A-P  and  may  be
  3178.                 specified as:
  3179.                     1.   a string, e.g. C
  3180.                     2.   a literal, e.g. "B"
  3181.                     3.   a variable
  3182.  
  3183.  $Y$ The system variable RESP is updated by this command and is
  3184.                 set to zero if the drive has been successfully selected.
  3185.  
  3186.  NOTE2          The  system  variable  DDRIVE will be  updated  when  this
  3187.                 command is successful.
  3188.  
  3189.  NOTE3          The  command should be used particularly after  loading  a
  3190.                 diskette to ensure that the diskette directory is current.
  3191. @end
  3192. @nf a7
  3193. @head centre,"The STRATEGY command"
  3194. @ban
  3195. @border
  3196.  
  3197.  PURPOSE        Changes the strategy used by MS-DOS when allocating memory
  3198.                 blocks.  The strategy may need to be changed if failure to
  3199.                 utilise memory efficiently is experienced, e.g. failure to
  3200.                 load additional programs in shell environments.
  3201.  
  3202.  $X$ STRATEGY int CODE
  3203.                 where CODE is an integer constant or variable with
  3204.                 a value in the range 0-2.
  3205.  $Y$ The following strategies are available -
  3206.                 0      =  First  fit.   MS-DOS  will  look  for  available
  3207.                           memory blocks starting at the bottom of RAM  and
  3208.                           allocate the first one it finds which  satisfies
  3209.                           the request.
  3210.                 1    =    Best fit.  MS-DOS searches all available  memory
  3211.                           looking for the smallest block that will satisfy
  3212.                           the request.
  3213.                 2     =   Last  fit.  MS-DOS looks  for  available  memory
  3214.                           blocks starting at the top of RAM.
  3215.  NOTE2          The default strategy is 0.
  3216.  NOTE3          If  you change the strategy, the new strategy will  remain
  3217.                 in force until a reboot or a further change.
  3218. @end
  3219. @nf mb
  3220. @head left,"Form and menu commands"
  3221. $P$
  3222. @head centre,"Menu"
  3223. @ban
  3224. @border
  3225.  
  3226. @bbmenu white,red
  3227.   {ENDM     }
  3228.   {EXITM    }
  3229.   {FIELDFILL}
  3230.   {FORMS    }
  3231.   {GET      }
  3232.   {INSERT   }
  3233.   {MENU     }
  3234.   {OPTION   }
  3235.   {PUT      }
  3236.   {RETURN   }
  3237. @col char,white,red
  3238. @win line2,column14,depth10,width60
  3239. End of menu declaration
  3240. Find the ENDM command for current menu
  3241. Fills unprotected form fields
  3242. Open a nominated SCR forms file
  3243. Data capture from forms
  3244. Variable text in forms
  3245. Display a conventional of Bounce-bar Menu
  3246. Block start for menu option
  3247. Displays forms or bounce-bar menus
  3248. Redisplay current or previous Menu
  3249. $A$
  3250. @end
  3251.  
  3252. @nf b1
  3253. @head centre,"The ENDM command"
  3254. @ban
  3255. @border
  3256.  
  3257.  PURPOSE        Specifies the physical end of a menu.  The LOGICAL end  of
  3258.                 the menu is determined by a RETURN or EXITM command.
  3259.  
  3260.                 It  must be present whenever the EXITM command is  used to
  3261.                 cause an exit from a menu option command  sequence,  since
  3262.                 EXITM causes a search for the ENDM command.
  3263.  
  3264.                 If the time-out facility is being used the ENDM command is
  3265.                 also mandatory.  It is not otherwise required.
  3266.  
  3267.  $X$ ENDM menu-number
  3268.  
  3269.  $Y$ The  menu-number must correspond with the one  defined  in
  3270.                 the respective MENU command.
  3271. @end
  3272.  
  3273. @nf b2
  3274. @head centre,"The EXITM command"
  3275. @ban
  3276. @border
  3277.  
  3278.  PURPOSE        Causes  an  exit  from the current menu  to  the   command
  3279.                 following the ENDM command for the menu.
  3280.  
  3281.  $X$ EXITM
  3282.  
  3283.  $Y$ When  creating a menu it is normal to arrange for  one  of
  3284.                 the menu options to cause an exit from the menu.
  3285.  
  3286.                 This exit may be to either a higher level menu (using  the
  3287.                 return  command)  or  to   a  sequence  of  commands   not
  3288.                 associated with the menu,  for example, the end of a task.
  3289.  
  3290.  NOTE2          The  exitm command is not mandatory.  You can  exit  menus
  3291.                 by  executing  EXITM,  RETURN n (if there  is  a  previous
  3292.                 menu) or STOP.
  3293. @end
  3294. @nf b3
  3295. @head centre,"The FIELDFILL command"
  3296. @ban
  3297. @border
  3298.  
  3299.  PURPOSE        Places  the  contents of variables into  the  next  screen
  3300.                 template  that is displayed with a PUT command.
  3301.  
  3302.  $X$ FIELDFILL list_of_variables
  3303.  
  3304.  $Y$ The  variables should be presented in the  same  order  as
  3305.                 the fields appear in the form.
  3306.  
  3307.  NOTE2          If   the variables supplied are too large to fit  in   the
  3308.                 available fields they will be truncated.
  3309.  
  3310.  NOTE3          The  number of datatypes should not exceed the  number  of
  3311.                 fields in the form (maximum is therefore 20).
  3312.  
  3313.  NOTE4          If  FIELDFILL is not used the data within the fields  will
  3314.                 be that present in the screen source file.
  3315. @end
  3316. @nf b4
  3317. @head centre,"The FORMS command"
  3318. @ban
  3319. @border
  3320.  
  3321.  PURPOSE        Opens a file created by Scr containing templates  relating
  3322.                 to  the present task.
  3323.  
  3324.  $X$ FORMS forms_file_name
  3325.  
  3326.                 where forms_file_name is a string, literal or var.
  3327.  
  3328.  $Y$ The   forms  file  is created by Scr and  has  a   default
  3329.                 filetype   of OVR,  which should be specified as  part  of
  3330.                 the filename.
  3331.  
  3332.  NOTE2          The  act of  opening a new forms file will   automatically
  3333.                 close the currently opened file as required.
  3334.  
  3335.  NOTE3          It is used in conjunction with the PUT and MENU  commands,
  3336.                 which it must logically precede.
  3337.  
  3338.  NOTE4          The  FORMS command reports the version number of the  copy
  3339.                 of  Scr that was used to create the OVR file in  the  RESP
  3340.                 system variable; e.g. V4.30 is returned as 430.
  3341. @end
  3342. @nf b5
  3343. @head centre,"The GET command"
  3344. @ban
  3345. @border
  3346.  
  3347.  PURPOSE        Obtains  the  contents of one or more fields from  a  form
  3348.                 presented  to the user by a PUT command, when  the  RETURN
  3349.                 key is pressed and all data entered is valid according  to
  3350.                 rules implicit on the type of field(s).
  3351.  
  3352.  $X$ GET list_of_vars_and/or_logicals
  3353.  
  3354.  $Y$ If  validation checks fail then offending fields  will  be
  3355.                 shown on the screen with flashing opening feet.
  3356.  
  3357.  NOTE2          The   GET command need not be issued   immediately   after
  3358.                 its corresponding PUT command.   It may be in a loop.
  3359.  
  3360.  NOTE3          Function Keys offer an alternative exit for forms and  may
  3361.                 detected using the ANYFK and FUNKEY system variables.
  3362.  
  3363.  NOTE4          Any  data  contained within the field in the  form  source
  3364.                 file  will  be treated as default data when  the  FORM  is
  3365.                 displayed.
  3366. @end
  3367. @nf b6
  3368. @head centre,"The INSERT command"
  3369. @ban
  3370. @border
  3371.  
  3372.  PURPOSE        Before   displaying  a  form from the  FORMS  file,   this
  3373.                 command  may  be  used to insert text into  the  form   at
  3374.                 predetermined  positions (denoted by curly braces) in  the
  3375.                 forms file source.
  3376.  
  3377.                 It  is  particularly  useful  for  displaying   constantly
  3378.                 changing information such as totals, counts etc. each time
  3379.                 a form is displayed.
  3380.  
  3381.                 For a MENU, the INSERT command need not be used since  the
  3382.                 MENU   command  allows  an  optional  list  of   insertion
  3383.                 datatypes.
  3384.  
  3385.  $X$ INSERT list_of_variables
  3386. @end
  3387. @nf b7
  3388. @head centre,"The MENU command"
  3389. @ban
  3390. @border
  3391.  
  3392.  PURPOSE        The MENU may be of three types:
  3393.                 Conventional:   This  consists  of a list of  topics  from
  3394.                                 which a numeric selection is made.
  3395.                 "Bounce-bar":   Here a list of topics is displayed, one of
  3396.                                 which is highlighted. The user  highlights
  3397.                                 the appropriate topic to make a selection.
  3398.                                 A  first  character  search  facility   is
  3399.                                 built-in  and if used the  requirement  to
  3400.                                 confirm selection by pressing <return>  is
  3401.                                 optional.
  3402.                 Virtual         Here  no template is associated  with  the 
  3403.                                 menu, allowing MENU, OPTION, RETURN, EXITM 
  3404.                                 and ENDM commands to implement an advanced
  3405.                                 'case' construct.  See WORDPROC.TSK.
  3406.  $X$ MENU number,name {{,list_of_insertion_vars}}
  3407.  
  3408.                 OPTION number, option-number          }} repeated for
  3409.                   TASKMASTER commands for this option }} each option
  3410.                 RETURN, EXITM or STOP                 }}
  3411.  
  3412.                 {{ENDM number}}  only required when EXITM is used.
  3413. @end
  3414. @nf b8
  3415. @head centre,"The OPTION command"
  3416. @ban
  3417. @border
  3418.  
  3419.  PUROSE         Identifies the start of the {{CODE-BLOCK}} to be  obeyed  in
  3420.                 response to a menu selection.
  3421.  
  3422.                 OPTION  blocks should be logically terminated by either  a
  3423.                 RETURN, EXITM or STOP command.
  3424.  
  3425.  $X$ OPTION menu-number,option-number{{,option-number-2}}
  3426.  
  3427.  $Y$ menu-number is as defined in the MENU command.
  3428.  NOTE2          Control   will  transfer  to the command   following   the
  3429.                 OPTION   command  and commands will be  obeyed   until   a
  3430.                 RETURN or EXITM command is encountered.
  3431.  NOTE3          Refer  to  BBMASK  system variable for  details  of  which
  3432.                 options are executed as a result of special keys.
  3433.  NOTE4          Option  commands  must  be  present  for  all   selectable
  3434.                 options.  Failure to locate the appropriate option command
  3435.                 causes a fatal error.
  3436.  NOTE5          Option-number-2 if supplied, is shorthand for all  options
  3437.                 between option-number and option-number-2 inclusively.
  3438. @end
  3439. @nf b9
  3440. @head centre,"The PUT command"
  3441. @ban
  3442. @border
  3443.  
  3444.  PURPOSE        Displays  a form (or bounce-bar menu) from the forms  file
  3445.                 and optionally waits for valid data to be entered.
  3446.  
  3447.  $X$ PUT formname {{WAIT n}}{{NOCLEAR}}{{NODATA}}{{UL x}}{{SW field_no}}
  3448.                 where:
  3449.                 formname is mandatory naming the required SCR form,if WAIT
  3450.                 given:  n is mandatory display time. if UL is supplied,  x
  3451.                 is  displayed on line 25. (unless NULL in which case  line
  3452.                 25 not updated). field_no is an integer whose value is the
  3453.                 field in which to place cursor initially. NOCLEAR means no
  3454.                 clear screen afterwards, NODATA don't do data capture. The
  3455.                 keyword NOWAIT is equivalent to WAIT 0 NOCLEAR. 
  3456.  $Y$ Pressing  a Function  key in preference to completing  the
  3457.                 form updates system variables ANYFK and FUNKEY.
  3458.  NOTE2          To make forms timeout: use system variable TIMER.
  3459.  NOTE3          PUT can display Bounce-bar menus.  CHOICE and HILITE being
  3460.                 used to determine action to take.
  3461.  NOTE4          Function keys are controlled by BBMASK system variable.
  3462.  NOTE5          Optional parameters may be given in any order.
  3463. @end
  3464. @nf ba
  3465. @head centre,"The RETURN command"
  3466. @ban
  3467. @border
  3468.  
  3469.  PURPOSE        Causes the re-entry of a previously actioned menu
  3470.  
  3471.  $X$ RETURN {{number-of-levels}}
  3472.                 RETURN {{100 + number-of-levels}}
  3473.  
  3474.  $Y$ If  the number-of-levels is specified,  this  will   cause
  3475.                 control   to  be transferred to the  appropriate   higher-
  3476.                 level  menu,  e.g.   RETURN 1 will cause a return  to  the
  3477.                 menu from which the current menu was invoked.
  3478.  
  3479.  NOTE2          Sometimes it is convenient to use the RETURN command  from
  3480.                 within   a   {{CODE-BLOCK}},   i.e.  inside  a   series   of
  3481.                 IF/WHILE/UNTIL commands; this is perfectly legal.
  3482.  
  3483.  NOTE3          For  bounce-bar menus: adding 100 to the number of  levels
  3484.                 parameter  causes an automatic selection to be  made  from
  3485.                 the  menu  returned to: as if user had returned  and  then
  3486.                 pressed <return>.
  3487. @end
  3488. @nf mc
  3489. @head left,"Disc and File handling"
  3490. $P$
  3491. @head centre,"Menu"
  3492. @ban
  3493. @border
  3494.  
  3495. @bbmenu white,red
  3496.   {DIR      }
  3497.   {ERASE    }
  3498.   {GETVOL   }
  3499.   {LOOKFOR  }
  3500.   {RESTORE  }
  3501.   {SAVE     }
  3502.   {VERIFY   }
  3503.   {USER     }
  3504. @col char,white,red
  3505. @win line2,column14,depth8,width60
  3506. Confirms a file exists
  3507. Erase file
  3508. Returns volume details
  3509. Confirms a file can be opened for reading
  3510. Restores datatype values from a file
  3511. Saves datatype values into a file
  3512. Verifies a filename
  3513. Gets / changes MS-DOS directory
  3514. $A$
  3515. @end
  3516.  
  3517.  
  3518. @nf c1
  3519. @head centre,"The DIR command"
  3520. @ban
  3521. @border
  3522.  
  3523.  PURPOSE        Confirms the existence of a named file.
  3524.  
  3525.  $X$ DIR {{filename}}
  3526.                 Where  filename is as for the LOOKFOR command.   See  also
  3527.                 note 5.
  3528.  
  3529.  $Y$ If the named file exists, the system logical FOUND is set.
  3530.  NOTE2          The  system integer variable RESP is updated by DIR.
  3531.  NOTE3          Only normal files are supported, i.e. not hidden files.
  3532.  NOTE4          DISPLAY System Variable is set up as follows:
  3533.                 Byte  21    is the file attribute byte
  3534.                 Bytes 22-25 is  file  time  stamp processed  into  a  form
  3535.                             suitable  for direct string comparison  in  IF
  3536.                             commands.
  3537.                 Bytes 30-42 is the filename terminated by 00h.
  3538.  
  3539.  NOTE5          Filename may include wild cards * and ?, if it  does  then
  3540.                 subsequent DIR commands without a  parameter  will  return
  3541.                 each matching files details in turn.  See STANDARD.TSK. To
  3542.                 use  this mode please refrain from  using  other  commands
  3543.                 that update the DISPLAY system variable in the processing.
  3544. @end
  3545. @nf c2
  3546. @head centre,"The ERASE command"
  3547. @ban
  3548. @border
  3549.  
  3550.  PURPOSE        This command can be used to erase one or more files as  an
  3551.                 alternative to running the MS-DOS ERASE or DEL utilities.
  3552.  
  3553.  $X$ ERASE list-of-filenames
  3554.  
  3555.  $Y$ The   filenames can be ambiguous if required,   using  the
  3556.                 MS-DOS  style   wildcard characters ?  and *  (  where   ?
  3557.                 matches  any character and * matches any valid sequence of
  3558.                 characters ).
  3559.  
  3560.  NOTE2          Filenames  may  be  specified  as  strings,  literals   or
  3561.                 variables.
  3562.  
  3563.  NOTE3          The  system  integer variable RESP contains  the  response
  3564.                 from MS-DOS which is normally zero when the file has  been
  3565.                 successfully erased or 255 if the file did not exist.
  3566.  
  3567.  $V$ ERASE "FRED?.*"
  3568. @end
  3569. @nf c3
  3570. @head centre,"The GETVOL command"
  3571. @ban
  3572. @border
  3573.  
  3574.  PURPOSE        To  read a volume label that has been written to fixed  or
  3575.                 removable  media using the MS-DOS LABEL command. This  has
  3576.                 obvious  application when using removable media such as  a
  3577.                 diskette  and it is important to ensure that  the  correct
  3578.                 one has been loaded before attempting to use it.
  3579.  
  3580.  $X$ GETVOL drive GIVING volume-label
  3581.  
  3582.                 DRIVE is the name of the drive, i.e. a letter A-P and  may
  3583.                 be given as a string, literal or variable.
  3584.  
  3585.                 VOLUME-LABEL is a variable of declared size not less  than
  3586.                 11 bytes.
  3587.  
  3588.  $N$ If  the specified drive does not have a volume label,  the
  3589.                 system logical variable FOUND will be set to FALSE.
  3590. @end
  3591. @nf c4
  3592. @head centre,"The LOOKFOR command"
  3593. @ban
  3594. @border
  3595.  
  3596.  PURPOSE        Confirms the availability of a named file in  the  working
  3597.                 directory or in any directory named in the APPEND list.
  3598.  
  3599.  $X$ LOOKFOR filename
  3600.  
  3601.                 Where filename is a list of datatypes composed of:
  3602.                         STRING
  3603.                         LITERAL
  3604.                         VARIABLE
  3605.                 and may comprise a full hierarchical filename.
  3606.  
  3607.  $Y$ If the named file exists, the system logical FOUND is  set
  3608.                 to TRUE.
  3609.  
  3610.  NOTE2          The  system integer variable RESP will be set to  indicate
  3611.                 the  reason in the event that the file  was  inaccessible;
  3612.                 RESP is set to 0 for success.
  3613.  
  3614.  NOTE3          Use the DIR command if you don't wish the APPEND list  to
  3615.                 be taken into consideration.
  3616. @end
  3617. @nf c5
  3618. @head centre,"The RESTORE command "
  3619. @ban
  3620. @border
  3621.  
  3622.  PURPOSE        Restores the nominated user datatypes to values previously
  3623.                 stored using the SAVE command.
  3624.  
  3625.  $X$ RESTORE hierarchic-filename
  3626.  SYNTAX2        RESTORE hierarchic-filename list-of-datatypes
  3627.  SYNTAX3        RESTORE list-of-datatypes
  3628.  SYNTAX4        RESTORE
  3629.  
  3630.                 Variant 1 opens the file ready for use.
  3631.                 Variant 2 opens the file and restores datatypes in list.
  3632.                 Variant 3 restores datatypes in list (after type 1 or 2).
  3633.                 Variant 4 closes the file.
  3634.  
  3635.  $Y$ RESP set after command to report usual open or read errors
  3636.                 if any.  Normally RESP should be zero.
  3637.  
  3638.  NOTE2          Attempting  to restore from an unsuitable file will  cause
  3639.                 unpredictable results and set RESP to 99.
  3640.  
  3641.  NOTE3          To reset the file to beginning: use variant 4 followed  by
  3642.                 variant 1.  See SAVE command.
  3643. @end
  3644.  
  3645. @nf c6
  3646. @head centre,"The SAVE command"
  3647. @ban
  3648. @border
  3649.  
  3650.  PURPOSE        Saves the contents of nomimated user datatypes into a file
  3651.                 for subsequent restoration using the RESTORE command.
  3652.  
  3653.  $X$ SAVE {{APPEND}} hierarchic-filename 
  3654.  SYNTAX2        SAVE hierarchic-filename list-of-datatypes
  3655.  SYNTAX3        SAVE list-of-datatypes
  3656.  SYNTAX4        SAVE
  3657.  
  3658.                 Where:  list-of-datatypes can contain variables, table-of-
  3659.                         var, integer variables and logical variables.
  3660.  
  3661.  $Y$ RESP  set  after command to report usual Create  or  Write
  3662.                 errors if any.  Normally RESP should be zero.
  3663.  NOTE2          Variant  1  unconditionally  creates  a  file  unless  the
  3664.                 APPEND  clause  is  present.  In  append  mode  variant  3 
  3665.                 SAVEs will write to the end-of-file.
  3666.  NOTE3          One  or more instances of variant 3 may be used and should
  3667.                 be followed by variant 4 to close the file.
  3668.  NOTE4          Separate SAVE and RESTORE files may be open concurrently.
  3669. @end
  3670.  
  3671. @nf c7
  3672. @head centre,"The VERIFY command"
  3673. @ban
  3674. @border
  3675.  
  3676.  PURPOSE        This  command provides comprehensive filename   validation
  3677.                 capabilities.   If  you  want to  verify  a  Directory  or
  3678.                 Pathname see the USER command and the SCR @PATH directive.
  3679.  
  3680.  $X$ VERIFY filename USING error_code result
  3681.                 filename  is the filename to verify, result is a  variable
  3682.                 >= 14 bytes to receive the processed result.
  3683. @gon
  3684.   Code Meaning                             Processed result
  3685.  7---8---------------------------------9  7-------8--------------9
  3686.  0 0 0 filename valid.                 0  0byte  00 drive letter 0
  3687.  0 1 0 filename  too long or filename  0  4-------5--------------6
  3688.  0   0 is a NULL variable.             0  0byte  10 a colon      0
  3689.  0 2 0 filename is SPACE filled.       0  4-------5--------------6
  3690.  0 3 0 drive only given - no filename. 0  0bytes 20 the filename 0
  3691.  0 4 0 drive name invalid (a-p or A-P) 0  0thru  90              0
  3692.  0 5 0 invalid character in filename.  0  4-------5--------------6
  3693.  0 6 0 filename part exceeds 8 chars   0  0byte 100 a full stop  0
  3694.  0 7 0 ext exceeds 3 chars             0  4-------5--------------6
  3695.  1---2---------------------------------3  0bytes110 the filetype 0
  3696.                                           0thru 130              0
  3697.                                           1-------2--------------3
  3698. @end
  3699. @nf c8
  3700. @head centre,"The USER command"
  3701. @ban
  3702. @border
  3703.  
  3704.  PURPOSE        Emulates the MS-DOS CHDIR command.  To obtain the  current
  3705.                 directory/path.
  3706.  
  3707.  $X$ USER user_var
  3708.  
  3709.                 where user_var is a literal, string or variable containing
  3710.                 the required pathname or a {{NULL}} VARIABLE.
  3711.  
  3712.  $Y$ If  user_var  is  a NULL variable the  USER  command  will
  3713.                 return the currently selected directory in user_var.  Upto
  3714.                 68  characters may be returned the drive identifier and  a
  3715.                 colon will always be returned.
  3716.  NOTE2          Taskmaster  remembers  its working directory  and  so  can
  3717.                 continue  to read the task and forms.
  3718.  NOTE3          DO NOT use the MS-DOS CHDIR command via the RUN command.
  3719.  NOTE4          Please TRIM user_var.
  3720.  NOTE5          Following successful completion the USER command sets  the
  3721.                 system  variable  RESP  to 0.  A non-zero  value  in  RESP
  3722.                 indicates failure.
  3723. @end
  3724. @nf md
  3725. $P$
  3726. @head left,"Diagnostics"
  3727. @head centre,"Menu"
  3728. @ban
  3729. @border
  3730.  
  3731. @bbmenu white,red
  3732.   {NOTRACE  }
  3733.   {STEP     }
  3734.   {TRACE    }
  3735. @col char,white,red
  3736. @win line2,column14,depth3,width60
  3737. Stops trace mode
  3738. Enter Single Step Mode - pause at each command.
  3739. Display each command as it executes
  3740. $A$
  3741. @end
  3742.  
  3743.  
  3744. @nf d1
  3745. @head centre,"The NOTRACE command"
  3746. @ban
  3747. @border
  3748.  
  3749.  PURPOSE        Stops  echo of commands to the console during execution of
  3750.                 a task by the Interpreter.
  3751.  
  3752.  $X$ NOTRACE
  3753.  
  3754.  $Y$ Resets STEP - See STEP command.
  3755.  
  3756.  NOTE2          Resets TRACE.
  3757. @end
  3758. @nf d2
  3759. @head centre,"The STEP command"
  3760. @ban
  3761. @border
  3762.  
  3763.  PURPOSE        This   command  causes a pause before  each   command   is
  3764.                 executed.   Thus  when  TRACE is set,  commands  will   be
  3765.                 displayed one at a time for perusal.
  3766.  
  3767.  $X$ STEP
  3768.  
  3769.  $Y$ The   command  is  ignored if a TRACE  command   has   not
  3770.                 previously been issued.
  3771.  
  3772.  NOTE2          Upon   encountering this command,  the  Interpreter   will
  3773.                 display the following message on the screen :
  3774.  
  3775.                 ... Single-step mode selected (CTRL/D to De-activate)
  3776.  
  3777.                 The  next and successive commands will be  displayed   and
  3778.                 Taskmaster will  suspend until you press a  key.  If   you
  3779.                 press   <CTRL>  and D together single step mode  will   be
  3780.                 terminated.
  3781.  
  3782.  NOTE3          If  a NOTRACE command is encountered the effects  of   the
  3783.                 STEP  command  will  be cancelled.
  3784. @end
  3785. @nf d3
  3786. @head centre,"The TRACE command"
  3787. @ban
  3788. @border
  3789.  
  3790.  PURPOSE        Echoes  commands  to  the terminal  as   they   are  being
  3791.                 executed,  until a NOTRACE command is encountered.
  3792.  
  3793.  $X$ TRACE
  3794.  
  3795.  $Y$ Whenever  an IF / UNTIL / WHILE command is  being  obeyed,
  3796.                 the    result  of  the  associated  condition   will    be
  3797.                 displayed and the block level, e.g.
  3798.  
  3799.                 UNTIL CTIME sw "22:00"
  3800.           FALSE  (01)
  3801.                   WAIT 58
  3802.                   MOVE TIME TO CTIME
  3803.                 FI
  3804.  
  3805.  NOTE2          Single   stepping of commands is achieved with  the   STEP
  3806.                 command and can only be used when TRACE mode has been set.
  3807. @end
  3808. @eof
  3809.  
  3810. 
  3811.